Quantcast
Channel: WPF Localization Extension
Viewing all 286 articles
Browse latest View live

Created Unassigned: "Key:" is returned when using empty key [9311]

$
0
0
Hi guys,

Thirst of all, I would like to thank you for your hard work on this great tool. I'm using it for some time in an application that I'm working on and it fulfilled all my requirements until now.
So, let's get to the subject:
I'm dynamically creating a toolbar for my application (VS2010 + WPF + PRISM + C#). For each toolbar button, the Content and the Tooltip are bounded to the VM properties using LocExtension/LocBinding objects. All the buttons have some content, so no problem in here, but only some of the buttons have a tooltip. For those that don't have a tooltip, the underlying VM property was returning an empty string and no tooltip was displayed at runtime when using version 2.1.3 of the localization library. Now I'm using the 2.2.0 version and there is a tooltip also for the buttons even that they shouldn't have one. It says just "Key:".

I made some quick investigations and I suspect that this is caused by the fix for issue #9291.
The __FormatOutput__ method in the __LocExtension__ class, just before returning, has this code:

```
if (targetType == typeof(String) || targetType == typeof(object))
result = "Key: " + key;
```

Do you think that's possible for you to update the above condition with an extra check for non-empty key values in a future version? Is there any other solution to accomplish my goal and I'm missing that?

Thanks in advance,
Bogdan

New Post: "Key:" is returned when using empty key

$
0
0
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.

Edited Issue: "Key:" is returned when using empty key [9311]

$
0
0
Hi guys,

Thirst of all, I would like to thank you for your hard work on this great tool. I'm using it for some time in an application that I'm working on and it fulfilled all my requirements until now.
So, let's get to the subject:
I'm dynamically creating a toolbar for my application (VS2010 + WPF + PRISM + C#). For each toolbar button, the Content and the Tooltip are bounded to the VM properties using LocExtension/LocBinding objects. All the buttons have some content, so no problem in here, but only some of the buttons have a tooltip. For those that don't have a tooltip, the underlying VM property was returning an empty string and no tooltip was displayed at runtime when using version 2.1.3 of the localization library. Now I'm using the 2.2.0 version and there is a tooltip also for the buttons even that they shouldn't have one. It says just "Key:".

I made some quick investigations and I suspect that this is caused by the fix for issue #9291.
The __FormatOutput__ method in the __LocExtension__ class, just before returning, has this code:

```
if (targetType == typeof(String) || targetType == typeof(object))
result = "Key: " + key;
```

Do you think that's possible for you to update the above condition with an extra check for non-empty key values in a future version? Is there any other solution to accomplish my goal and I'm missing that?

Thanks in advance,
Bogdan

New Post: Ribbon control does not take new language values when we change language at runtime

$
0
0
Dear Tinkerfa,

This forum is not intended for advertising products - it should be used for discussion on feature requests and problems!
By the way: The question above you did not really respond to, is far outdated.

Best regards,
Uwe

New Post: "key: " in designer

$
0
0
Hi,

I'm now a fresh new owner of VS2013, but I have to find some time to evaluate the problem there. I'll keep you updated.

Best regards,
Uwe

Created Issue: Evaluate VS2013 Design-Time Behaviour [9312]

$
0
0
Evaluate VS2013 Design-Time Behaviour

Commented Issue: "Key:" is returned when using empty key [9311]

$
0
0
Hi guys,

Thirst of all, I would like to thank you for your hard work on this great tool. I'm using it for some time in an application that I'm working on and it fulfilled all my requirements until now.
So, let's get to the subject:
I'm dynamically creating a toolbar for my application (VS2010 + WPF + PRISM + C#). For each toolbar button, the Content and the Tooltip are bounded to the VM properties using LocExtension/LocBinding objects. All the buttons have some content, so no problem in here, but only some of the buttons have a tooltip. For those that don't have a tooltip, the underlying VM property was returning an empty string and no tooltip was displayed at runtime when using version 2.1.3 of the localization library. Now I'm using the 2.2.0 version and there is a tooltip also for the buttons even that they shouldn't have one. It says just "Key:".

I made some quick investigations and I suspect that this is caused by the fix for issue #9291.
The __FormatOutput__ method in the __LocExtension__ class, just before returning, has this code:

```
if (targetType == typeof(String) || targetType == typeof(object))
result = "Key: " + key;
```

Do you think that's possible for you to update the above condition with an extra check for non-empty key values in a future version? Is there any other solution to accomplish my goal and I'm missing that?

Thanks in advance,
Bogdan
Comments: I second this. On a similar note, the LocProxy should return an empty string when the Source property equals null (or maybe also an empty string or DependencyProperty.UnsetValue).

Commented Issue: "Key:" is returned when using empty key [9311]

$
0
0
Hi guys,

Thirst of all, I would like to thank you for your hard work on this great tool. I'm using it for some time in an application that I'm working on and it fulfilled all my requirements until now.
So, let's get to the subject:
I'm dynamically creating a toolbar for my application (VS2010 + WPF + PRISM + C#). For each toolbar button, the Content and the Tooltip are bounded to the VM properties using LocExtension/LocBinding objects. All the buttons have some content, so no problem in here, but only some of the buttons have a tooltip. For those that don't have a tooltip, the underlying VM property was returning an empty string and no tooltip was displayed at runtime when using version 2.1.3 of the localization library. Now I'm using the 2.2.0 version and there is a tooltip also for the buttons even that they shouldn't have one. It says just "Key:".

I made some quick investigations and I suspect that this is caused by the fix for issue #9291.
The __FormatOutput__ method in the __LocExtension__ class, just before returning, has this code:

```
if (targetType == typeof(String) || targetType == typeof(object))
result = "Key: " + key;
```

Do you think that's possible for you to update the above condition with an extra check for non-empty key values in a future version? Is there any other solution to accomplish my goal and I'm missing that?

Thanks in advance,
Bogdan
Comments: Created a pull request for a simple fix: https://github.com/SeriousM/WPFLocalizationExtension/pull/24 if (!string.IsNullOrEmpty(key) && (targetType == typeof(String) || targetType == typeof(object))) result = "Key: " + key;

Commented Issue: "Key:" is returned when using empty key [9311]

$
0
0
Hi guys,

Thirst of all, I would like to thank you for your hard work on this great tool. I'm using it for some time in an application that I'm working on and it fulfilled all my requirements until now.
So, let's get to the subject:
I'm dynamically creating a toolbar for my application (VS2010 + WPF + PRISM + C#). For each toolbar button, the Content and the Tooltip are bounded to the VM properties using LocExtension/LocBinding objects. All the buttons have some content, so no problem in here, but only some of the buttons have a tooltip. For those that don't have a tooltip, the underlying VM property was returning an empty string and no tooltip was displayed at runtime when using version 2.1.3 of the localization library. Now I'm using the 2.2.0 version and there is a tooltip also for the buttons even that they shouldn't have one. It says just "Key:".

I made some quick investigations and I suspect that this is caused by the fix for issue #9291.
The __FormatOutput__ method in the __LocExtension__ class, just before returning, has this code:

```
if (targetType == typeof(String) || targetType == typeof(object))
result = "Key: " + key;
```

Do you think that's possible for you to update the above condition with an extra check for non-empty key values in a future version? Is there any other solution to accomplish my goal and I'm missing that?

Thanks in advance,
Bogdan
Comments: OK Thank you for your fast help. I've merged the pull request and will enque it to the next release.

New Post: Default assembly value

$
0
0
Hello,

the localization library is really great. But I don't really like to set the default assembly in each XAML files. What if I change the name of the assembly, then I have to go through all the XAML files and correct it.

I think it would be nice if the current assembly is being used, if no assembly is set in the xaml file. Another neat solution would be the possibility to set an own implementation of the ResxLocalizationProvider. That could be done in the App.cs:
public App()
{
    LocalizeDictionary.Instance.LocalizationProvider = new MyResxLocalizationProvider();
}
Just some ideas that came into my mind.

New Post: "key: " in designer

New Post: "key: " in designer

$
0
0
Hi All,

I have good news ;-)
I just installed the VS2013 Update1 and I looks like the issue is gone!

Regards
Rainer

New Post: "key: " in designer

$
0
0
Sorry, I looks like I was too enthusiastic.
First my Views did not show the "key:" any more. Then I played around with them a little and now the "key:" is back ;-(

Regards
Rainer

New Post: Slow performance on Wrap Panel

$
0
0
Hello devs,

Currently I am working on a project that display a list of item inside wrappanel, and each item's template will contain a TextBlock which display the item's name and a text label with localization.

The problem is, the list_1 is 1000 items long, it take around 1 second for first load, which is fine, however, when I switch the warppanel to load the list_2 (1000 items long), it will take 2 second, and switch the warppanel to load back the list_1, it will take 5 seconds, and each time when I switch the ItemsSource, it will take longer time to load the list.

But for the same logic, without localization, the time for loading is constant (around 1 second) for loading the list, no matter how many times you switch the ItemsSource.

Does anyone has this problem before? Please help.. Thanks!

Sample project download link:
http://www.verge.hk/temp/michael/localizeproject.zip

MainWindow.xaml
<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Engine="clr-namespace:WPFLocalizeExtension.Engine;assembly=WPFLocalizeExtension"
        xmlns:lex="http://wpflocalizeextension.codeplex.com"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="LocalizeProject.MainWindow"
        lex:LocalizeDictionary.DesignCulture="en"
        Title="MainWindow" Height="600" Width="800">
    <Window.Resources>
        <Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListViewItem}">
                        <Grid Height="70" HorizontalAlignment="Left" Width="70">
                            <TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,34" TextWrapping="Wrap" Text="{Binding ItemName}" Width="Auto" Height="Auto"/>
                            <Grid Height="34" VerticalAlignment="Bottom" Background="Red" Margin="4">
                                <TextBlock x:Name="SoldoutLabel" Margin="0,8" TextWrapping="Wrap" Text="{lex:LocText LocalizeProject:MultiLanguage:WPF_沽清}" Foreground="White"/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
            <WrapPanel Orientation="Horizontal"
            Width="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}" ScrollViewer.VerticalScrollBarVisibility="Disabled" d:DesignWidth="386" />
        </ItemsPanelTemplate>
        <Style x:Key="ListViewItemStyle2" TargetType="{x:Type ListViewItem}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListViewItem}">
                        <Grid Height="70" HorizontalAlignment="Left" Width="70">
                            <TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,34" TextWrapping="Wrap" Text="{Binding ItemName}" Width="Auto" Height="Auto"/>
                            <Grid Height="34" VerticalAlignment="Bottom" Background="Red" Margin="4">
                                <TextBlock Margin="0,8" TextWrapping="Wrap" Text="Soldout" Foreground="White"/>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <ItemsPanelTemplate x:Key="ItemsPanelTemplate2">
            <VirtualizingStackPanel IsItemsHost="True"/>
        </ItemsPanelTemplate>
        <DataTemplate x:Key="DataTemplate1">
            <Grid Height="20" HorizontalAlignment="Left" Width="20">
                <TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,5" TextWrapping="Wrap" Text="{Binding ItemName}" Width="Auto" Height="Auto"/>
                <Grid Height="10" VerticalAlignment="Bottom" Background="Red" Margin="4">
                    <TextBlock Margin="0" TextWrapping="Wrap" Text="{lex:LocText LocalizeProject:MultiLanguage:a01}" Foreground="White"/>
                </Grid>
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid d:DataContext="{d:DesignData /SampleData/MainWindowViewModelSampleData.xaml}">
        <ListView x:Name="ListViewLeft" HorizontalAlignment="Left" Margin="8,50,0,80" ItemsSource="{Binding AllItemMasterList}" Width="275" ItemContainerStyle="{DynamicResource ListViewItemStyle1}" ItemsPanel="{DynamicResource ItemsPanelTemplate1}">
            <ListView.View>
                <GridView>
                    <GridViewColumn/>
                </GridView>
            </ListView.View>
        </ListView>
        <ListView x:Name="ListViewRight" Margin="287,50,228,80" ItemsSource="{Binding AllItemMasterList_1}" ItemContainerStyle="{DynamicResource ListViewItemStyle2}" ItemsPanel="{DynamicResource ItemsPanelTemplate1}">
            <ListView.View>
                <GridView>
                    <GridViewColumn/>
                </GridView>
            </ListView.View>
        </ListView>
        <Button x:Name="LeftPageUpButton" Content="List 1"  HorizontalAlignment="Left" Height="40" Margin="8,0,0,36" VerticalAlignment="Bottom" Width="105" Click="LeftPageUpButton_Click"/>
        <Button x:Name="LeftPageDownButton" Content="List 2"  HorizontalAlignment="Left" Height="40" Margin="117,0,0,36" VerticalAlignment="Bottom" Width="105" Click="LeftPageDownButton_Click"/>
        <Button x:Name="RightPageUpButton" Content="List 1"  Height="40" Margin="287,0,0,36" VerticalAlignment="Bottom" Click="RightPageUpButton_Click" HorizontalAlignment="Left" Width="105"/>
        <Button x:Name="RightPageDownButton" Content="List 2" Height="40" Margin="0,0,283,36" VerticalAlignment="Bottom" Click="RightPageDownButton_Click" HorizontalAlignment="Right" Width="105"/>
        <TextBlock HorizontalAlignment="Left" Height="38" Margin="8,8,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="214"><Run Language="zh-tw" Text="With Localization"/></TextBlock>
        <TextBlock Height="38" Margin="287,8,283,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Language="zh-tw" Text="Without Localization"/></TextBlock>
        
    </Grid>
</Window>

New Post: "key: " in designer

$
0
0
I too have this problem in VS2012, but the 'workaround' doesn't work here as I always had it like that. Just an FYI, the old versions of this project always worked fine but the new versions have this problem here.

Commented Issue: NuGet package DLLs are not strong signed [9266]

$
0
0
Hi
I've used your NuGet package to add a reference to your extension, but your DLLs are not signed.
So my project fails to build, as it's signed...
As a workaround I have to download the source and add my key to your DLLs manually.

Please update NuGet package with strong named DLLs.

Thanx and have a nice day,
Paolo
Comments: "we plan to create automatic release publishings on codeplex including signed packages." Can we get this going the next version, please?

New Post: "key: " in designer

$
0
0
Since it made this new version completely useless, I did some checking myself and found the problem of this issue. It isn't that hard to fix actually.

In the ResxLocalizationProviderBase there is a function GetResourceManager that is not working correctly.

There is this line (line 248):
var dir = Path.GetDirectoryName(process.Modules[0].FileName);
This doesn't work for x64 processes when the host process is x86 (and the other way around).
This is easily solved through WMI (the only way that works afaik):

Create a function in the same file:
        /// <summary>
        /// Get the executable path for both x86 and x64 processes.
        /// </summary>
        /// <param name="processId">The process id.</param>
        /// <returns>The path if found; otherwise, null.</returns>
        private static string GetExecutablePath(int processId)
        {
            const string wmiQueryString = "SELECT ProcessId, ExecutablePath, CommandLine FROM Win32_Process";
            using (var searcher = new ManagementObjectSearcher(wmiQueryString))
            using (var results = searcher.Get())
            {
                var query = from p in Process.GetProcesses()
                            join mo in results.Cast<ManagementObject>()
                            on p.Id equals (int)(uint)mo["ProcessId"]
                            where p.Id == processId
                            select new
                            {
                                Process = p,
                                Path = (string)mo["ExecutablePath"],
                                CommandLine = (string)mo["CommandLine"],
                            };
                foreach (var item in query)
                {
                    return item.Path;
                }
            }
            return null;
        }
Then, change line 248 from above to:
   var dir = Path.GetDirectoryName(GetExecutablePath(process.Id));
   if (String.IsNullOrWhiteSpace(dir))
       continue;
However, there are is other major issue in this same function.

Let's start with the first. There are foreach loops over the files:
    foreach (var f in files)
There are a couple of issues I'm having with both these lines. The first being that it copies everything from every subdirectory. I have a subdirectory that stores temp files (a total of 12GB of small files). It takes 35 minutes to fully copy the folder that is of zero interest to this library. After all, it only needs two different file types, and the exe's and dll's of the assembly. So, the first change I made for both foreach loops is this:
 foreach (var f in files.Where(x => !String.IsNullOrWhiteSpace(x)))
                        {
                            if (!(f.EndsWith(".resx", StringComparison.OrdinalIgnoreCase) ||
                                  f.EndsWith(".resources", StringComparison.OrdinalIgnoreCase)) &&
                                  !dir.Equals(Path.GetDirectoryName(f), StringComparison.OrdinalIgnoreCase)) // We aren't bothered with other files
                                continue;

 // The other code
Then, there is this bit of code (283-288):
  var dst = Path.Combine(assemblyDir, f.Replace(dir + "\\", ""));

                                    var dstDir = Path.GetDirectoryName(dst);
                                    if (!Directory.Exists(dstDir))
                                        Directory.CreateDirectory(dstDir);
                                    File.Copy(f, dst, true);
Since the generated cache folder is already quite long (C:\Users\UserName\AppData\Local\Microsoft\VisualStudio\11.0\Designer\ShadowCache\gx43qkl1.wag\fdty5ini.grk\tmp), it easily goes over the max file path length (250). This caused the function to crash. Honestly, I don't care about one or two files that aren't able to be copied and thus disabling the whole preview so I made some changes too for this bit:
                                try
                                {
                                    var dst = Path.Combine(assemblyDir, f.Replace(dir + "\\", ""));

                                    var dstDir = Path.GetDirectoryName(dst);
                                    if (String.IsNullOrWhiteSpace(dstDir))
                                        continue;

                                    if (!Directory.Exists(dstDir))
                                        Directory.CreateDirectory(dstDir);
                                    File.Copy(f, dst, true);
                                }
                                // ReSharper disable once EmptyGeneralCatchClause
                                catch { } // Ignore exceptions so the designer can continue to work.
So, here is the request to the author to fix this in the version on NuGet so I can continue to use that one. I don't mind editing code but it would be nice if it worked out of the box.

Thanks for all your hard work on this, we've been using it for a while now, but in my opinion it's current state is worse than what it is a year ago.
I also don't understand the reason why you want to put LocTextUpper etc on obsolute. Using converters isn't always an option when you need multiple converters (and I don't like chaining converters).

There are also some data errors now:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.FrameworkElement', AncestorLevel='1''. BindingExpression:Path=Parent; DataItem=null; target element is 'ContextMenu' (Name='MainContextMenu'); target property is 'Parent' (type 'DependencyObject')

New Post: Default assembly value

$
0
0
Hi,

the extension is located in another assembly than yours so it does not explicitly know your assembly.
You should be able to set the DefaultProvider property of LocalizeDictionary in code behind.

Created Issue: Slow performance on Wrap Panel [9313]

$
0
0
Hello devs,

Currently I am working on a project that display a list of item inside wrappanel, and each item's template will contain a TextBlock which display the item's name and a text label with localization.

The problem is, the list_1 is 1000 items long, it take around 1 second for first load, which is fine, however, when I switch the warppanel to load the list_2 (1000 items long), it will take 2 second, and switch the warppanel to load back the list_1, it will take 5 seconds, and each time when I switch the ItemsSource, it will take longer time to load the list.

But for the same logic, without localization, the time for loading is constant (around 1 second) for loading the list, no matter how many times you switch the ItemsSource.

Does anyone has this problem before? Please help.. Thanks!

Sample project download link:
[http://www.verge.hk/temp/michael/localizeproject.zip](http://www.verge.hk/temp/michael/localizeproject.zip)

MainWindow.xaml
```
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Engine="clr-namespace:WPFLocalizeExtension.Engine;assembly=WPFLocalizeExtension"
xmlns:lex="http://wpflocalizeextension.codeplex.com"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="LocalizeProject.MainWindow"
lex:LocalizeDictionary.DesignCulture="en"
Title="MainWindow" Height="600" Width="800">
<Window.Resources>
<Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Grid Height="70" HorizontalAlignment="Left" Width="70">
<TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,34" TextWrapping="Wrap" Text="{Binding ItemName}" Width="Auto" Height="Auto"/>
<Grid Height="34" VerticalAlignment="Bottom" Background="Red" Margin="4">
<TextBlock x:Name="SoldoutLabel" Margin="0,8" TextWrapping="Wrap" Text="{lex:LocText LocalizeProject:MultiLanguage:WPF_沽清}" Foreground="White"/>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
<WrapPanel Orientation="Horizontal"
Width="{Binding ActualWidth,RelativeSource={RelativeSource AncestorType=ScrollContentPresenter}}" ScrollViewer.VerticalScrollBarVisibility="Disabled" d:DesignWidth="386" />
</ItemsPanelTemplate>
<Style x:Key="ListViewItemStyle2" TargetType="{x:Type ListViewItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Grid Height="70" HorizontalAlignment="Left" Width="70">
<TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,34" TextWrapping="Wrap" Text="{Binding ItemName}" Width="Auto" Height="Auto"/>
<Grid Height="34" VerticalAlignment="Bottom" Background="Red" Margin="4">
<TextBlock Margin="0,8" TextWrapping="Wrap" Text="Soldout" Foreground="White"/>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ItemsPanelTemplate x:Key="ItemsPanelTemplate2">
<VirtualizingStackPanel IsItemsHost="True"/>
</ItemsPanelTemplate>
<DataTemplate x:Key="DataTemplate1">
<Grid Height="20" HorizontalAlignment="Left" Width="20">
<TextBlock HorizontalAlignment="Stretch" Margin="0,0,0,5" TextWrapping="Wrap" Text="{Binding ItemName}" Width="Auto" Height="Auto"/>
<Grid Height="10" VerticalAlignment="Bottom" Background="Red" Margin="4">
<TextBlock Margin="0" TextWrapping="Wrap" Text="{lex:LocText LocalizeProject:MultiLanguage:a01}" Foreground="White"/>
</Grid>
</Grid>
</DataTemplate>
</Window.Resources>
<Grid d:DataContext="{d:DesignData /SampleData/MainWindowViewModelSampleData.xaml}">
<ListView x:Name="ListViewLeft" HorizontalAlignment="Left" Margin="8,50,0,80" ItemsSource="{Binding AllItemMasterList}" Width="275" ItemContainerStyle="{DynamicResource ListViewItemStyle1}" ItemsPanel="{DynamicResource ItemsPanelTemplate1}">
<ListView.View>
<GridView>
<GridViewColumn/>
</GridView>
</ListView.View>
</ListView>
<ListView x:Name="ListViewRight" Margin="287,50,228,80" ItemsSource="{Binding AllItemMasterList_1}" ItemContainerStyle="{DynamicResource ListViewItemStyle2}" ItemsPanel="{DynamicResource ItemsPanelTemplate1}">
<ListView.View>
<GridView>
<GridViewColumn/>
</GridView>
</ListView.View>
</ListView>
<Button x:Name="LeftPageUpButton" Content="List 1" HorizontalAlignment="Left" Height="40" Margin="8,0,0,36" VerticalAlignment="Bottom" Width="105" Click="LeftPageUpButton_Click"/>
<Button x:Name="LeftPageDownButton" Content="List 2" HorizontalAlignment="Left" Height="40" Margin="117,0,0,36" VerticalAlignment="Bottom" Width="105" Click="LeftPageDownButton_Click"/>
<Button x:Name="RightPageUpButton" Content="List 1" Height="40" Margin="287,0,0,36" VerticalAlignment="Bottom" Click="RightPageUpButton_Click" HorizontalAlignment="Left" Width="105"/>
<Button x:Name="RightPageDownButton" Content="List 2" Height="40" Margin="0,0,283,36" VerticalAlignment="Bottom" Click="RightPageDownButton_Click" HorizontalAlignment="Right" Width="105"/>
<TextBlock HorizontalAlignment="Left" Height="38" Margin="8,8,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="214"><Run Language="zh-tw" Text="With Localization"/></TextBlock>
<TextBlock Height="38" Margin="287,8,283,0" TextWrapping="Wrap" VerticalAlignment="Top"><Run Language="zh-tw" Text="Without Localization"/></TextBlock>

</Grid>
</Window>
```

__Updates 31/01/2014:__
Moreover, the output windows will display the follow error whenever I feed a new list to the itemsource:

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.FrameworkElement', AncestorLevel='1''. BindingExpression:Path=Parent; DataItem=null; target element is 'MainWindow' (Name=''); target property is 'Parent' (type 'DependencyObject')

New Post: Slow performance on Wrap Panel

$
0
0
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Viewing all 286 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>