Try to fix potential cast issue if renderer does not apply on certain themes
This commit is contained in:
parent
0882c488c9
commit
1ff766a199
@ -37,13 +37,13 @@ namespace Toolbox.Library.Forms
|
|||||||
public bool HighlightSelectedTab
|
public bool HighlightSelectedTab
|
||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
if (Renderer == null)
|
if (Renderer == null || !(Renderer is MenuRenderer))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return ((MenuRenderer)this.Renderer).HighlightMenuBar;
|
return ((MenuRenderer)this.Renderer).HighlightMenuBar;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
if (Renderer != null)
|
if (Renderer == null || !(Renderer is MenuRenderer))
|
||||||
((MenuRenderer)this.Renderer).HighlightMenuBar = value;
|
((MenuRenderer)this.Renderer).HighlightMenuBar = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,14 +33,14 @@ namespace Toolbox.Library.Forms
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (Renderer == null)
|
if (Renderer == null || !(Renderer is MenuRenderer))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return ((MenuRenderer)this.Renderer).HighlightMenuBar;
|
return ((MenuRenderer)this.Renderer).HighlightMenuBar;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (Renderer != null)
|
if (Renderer != null || !(Renderer is MenuRenderer))
|
||||||
((MenuRenderer)this.Renderer).HighlightMenuBar = value;
|
((MenuRenderer)this.Renderer).HighlightMenuBar = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user