Hi,
I was trying to implement a custom style in our radpanes but without success. These radpanes are created dynamically and we are using Windows 7 as the theme.
I found this one: Styling the RadPane Header from the forum but when I used the same style, there was no effect on my radpanes. I've also tried to just simply set the radpane's background color to something else but I still cannot see any changes.
This is what our radpanes look like:
What I'm trying to achieve is that I only want to color the radpane header when selected, change the background to blue and the text to white. I've already tried different ways to fix this but cannot see any effect!! Why? :(
I'm pasting the xaml code as well so you can check if there's anything wrong with it.
Also, the code behind how we create the radpanes dynamically:
I'm quite a newbie to silverlight, please help me.
Thanks.
I was trying to implement a custom style in our radpanes but without success. These radpanes are created dynamically and we are using Windows 7 as the theme.
I found this one: Styling the RadPane Header from the forum but when I used the same style, there was no effect on my radpanes. I've also tried to just simply set the radpane's background color to something else but I still cannot see any changes.
This is what our radpanes look like:
What I'm trying to achieve is that I only want to color the radpane header when selected, change the background to blue and the text to white. I've already tried different ways to fix this but cannot see any effect!! Why? :(
I'm pasting the xaml code as well so you can check if there's anything wrong with it.
<
Border
Grid.Row
=
"2"
Style
=
"{StaticResource ContentBorderStyle}"
>
<
telerik:RadDocking
x:Name
=
"radDocking"
Background
=
"Transparent"
>
<
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
x:Name
=
"radSplitContainer"
InitialPosition
=
"FloatingDockable"
>
<
telerik:RadPaneGroup
x:Name
=
"radCenterPaneGroup"
BorderBrush
=
"Transparent"
BorderThickness
=
"0"
>
<
telerik:RadPane
CanUserClose
=
"False"
Visibility
=
"Collapsed"
CanFloat
=
"False"
>
<
navigation:Frame
x:Name
=
"ContentFrame"
Style
=
"{StaticResource ContentFrameStyle}"
/>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking.DocumentHost
>
</
telerik:RadDocking
>
</
Border
>
Also, the code behind how we create the radpanes dynamically:
var window = AppBase.Current.NavigationWindows
.FirstOrDefault(w => w.NavigationCode == menuItem.NavigationCode);
if
(window !=
null
)
{
var windowInfo = (
this
.Windows ?? Enumerable.Empty<PcsysFxWindow>())
.FirstOrDefault(w => w.NavigationCode == menuItem.NavigationCode);
if
(windowInfo !=
null
&& windowInfo.IsSingleInstance)
{
var existingPane =
this
.radDocking.Panes
.FirstOrDefault(s => s.DataContext == windowInfo);
if
(existingPane !=
null
)
{
existingPane.IsHidden =
false
;
existingPane.IsSelected =
true
;
return
;
}
}
var paneGroup = ResolvePaneGroup(windowInfo);
var pane =
new
RadPane();
pane.Content = window.CreateWindowContent();
if
(windowInfo !=
null
)
{
pane.DataContext = windowInfo;
pane.Header = LocalizationManager.GetString(windowInfo.Header);
if
(windowInfo.InitialPosition < 0)
{
paneGroup.AddItem(pane, Telerik.Windows.Controls.Docking.DockPosition.Top);
pane.MakeFloatingDockable();
}
else
{
if
(paneGroup.Items.Count() > 0)
{
paneGroup.Items.Add(pane);
}
else
{
paneGroup.AddItem(pane, (Telerik.Windows.Controls.Docking.DockPosition)windowInfo.InitialPosition);
}
}
}
else
{
paneGroup.AddItem(pane, Telerik.Windows.Controls.Docking.DockPosition.Center);
}
return
;
I'm quite a newbie to silverlight, please help me.
Thanks.