Posted 14 years ago
by sean duggan
-
bank of america
Hi,
I am having trouble apply styles to the DocumentWindow since release 530. prior to 530 I could set the Image via a trigger, but now I cannot even set it, or the title through a Style.
I have included the following code that shows what I am doing. Any help would be appreciated.
Xaml looks like this
<dock:DocumentWindow x:Class="xyzNameSpace.TestReportView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dock="http://schemas.actiprosoftware.com/winfx/xaml/docking"
xmlns:Views="clr-namespace:xyzNameSpace" >
<dock:DocumentWindow.Resources>
<Style TargetType="{x:Type Views:TestReportView}">
<Setter Property="ImageSource" Value="//Images/Left.PNG"></Setter>
<Setter Property="Title" Value="TESTTEST" />
</Style>
</dock:DocumentWindow.Resources>
<Grid>
<TextBox Text="testText" />
</Grid>
</dock:DocumentWindow>
then in c# I create, add and activate the new documentWindow as follows.
var testReportView = new TestReportView();
dockSite.DocumentWindows.Add(testReportView);
testReportViewActivate(true);
If I set the values (eg Title) via code, then they appear, but if I use the Xaml Style as shown above, then nothing works.
Thanks,
Sean.
I am having trouble apply styles to the DocumentWindow since release 530. prior to 530 I could set the Image via a trigger, but now I cannot even set it, or the title through a Style.
I have included the following code that shows what I am doing. Any help would be appreciated.
Xaml looks like this
<dock:DocumentWindow x:Class="xyzNameSpace.TestReportView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dock="http://schemas.actiprosoftware.com/winfx/xaml/docking"
xmlns:Views="clr-namespace:xyzNameSpace" >
<dock:DocumentWindow.Resources>
<Style TargetType="{x:Type Views:TestReportView}">
<Setter Property="ImageSource" Value="//Images/Left.PNG"></Setter>
<Setter Property="Title" Value="TESTTEST" />
</Style>
</dock:DocumentWindow.Resources>
<Grid>
<TextBox Text="testText" />
</Grid>
</dock:DocumentWindow>
then in c# I create, add and activate the new documentWindow as follows.
var testReportView = new TestReportView();
dockSite.DocumentWindows.Add(testReportView);
testReportViewActivate(true);
If I set the values (eg Title) via code, then they appear, but if I use the Xaml Style as shown above, then nothing works.
Thanks,
Sean.