Style BasedOn breaks when x:key is addedWhen to use struct?Does my code demonstrate good WPF practice?WPF change Button Content on ViewModel.PropertyChanged eventBasing A Style Off A Dynamic Resourcewhat does x:Key=“x:Type TextBox” do?wpf TreeViewItem BringIntoView does not always workDynamicResource for Style BasedOnTrying to access style info by StaticResource through ResourceDictionary with x:KeyHow to make style to extend but not override other stylesCannot base style on another style
What is the farthest a camera can see?
Why did Saruman lie?
How to find directories containing only specific files
How to remove ambiguity: "... lives in the city of H, the capital of the province of NS, WHERE the unemployment rate is ..."?
crippling fear of hellfire &, damnation, please help?
Why aren't rainbows blurred-out into nothing after they are produced?
How do some PhD students get 10+ papers? Is that what I need for landing good faculty position?
Why is the Lucas test not recommended to differentiate higher alcohols?
Update Office without opening an Office application
Boss wants me to ignore a software API license prohibiting mass download
Is it okay for a ticket seller to grab a tip in the USA?
Running code generated in realtime in JavaScript with eval()
Why aren’t there water shutoff valves for each room?
Are differences between uniformly distributed numbers uniformly distributed?
Modeling the uncertainty of the input parameters
Do I have to cite common CS algorithms?
Is there a SQL/English like language that lets you define formulations given some data?
Is this n-speak?
Can lodestones be used to magnetize crude iron weapons?
Are employers legally allowed to pay employees in goods and services equal to or greater than the minimum wage?
Why are Tucker and Malcolm not dead?
Website error: "Walmart can’t use this browser"
Why command hierarchy, if the chain of command is standing next to each other?
Programmatically add log information in all renderings(controller, view) html
Style BasedOn breaks when x:key is added
When to use struct?Does my code demonstrate good WPF practice?WPF change Button Content on ViewModel.PropertyChanged eventBasing A Style Off A Dynamic Resourcewhat does x:Key=“x:Type TextBox” do?wpf TreeViewItem BringIntoView does not always workDynamicResource for Style BasedOnTrying to access style info by StaticResource through ResourceDictionary with x:KeyHow to make style to extend but not override other stylesCannot base style on another style
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have user control which define custom style for the telerik's control RadTreeViewItem
. The problem is that when I don't have x:key there isn't any errors but when I add the x:key property I've got error "The resource "RadTreeViewItemStyle" could not be resolved.
"
<ResourceDictionary>
<Style x:Key="MySuperGoodStyle" TargetType="telerik:RadTreeViewItem" BasedOn="StaticResource RadTreeViewItemStyle">
<Setter Property="IsSelected" Value="Binding IsSelected, Mode=TwoWay" />
<Setter Property="IsExpanded" Value="Binding IsExpanded, Mode=TwoWay" />
</Style>
</ResourceDictionary>
In runtime there isn't any problems, the style works fine as expected so it looks like design only error.
c# wpf xaml telerik
add a comment |
I have user control which define custom style for the telerik's control RadTreeViewItem
. The problem is that when I don't have x:key there isn't any errors but when I add the x:key property I've got error "The resource "RadTreeViewItemStyle" could not be resolved.
"
<ResourceDictionary>
<Style x:Key="MySuperGoodStyle" TargetType="telerik:RadTreeViewItem" BasedOn="StaticResource RadTreeViewItemStyle">
<Setter Property="IsSelected" Value="Binding IsSelected, Mode=TwoWay" />
<Setter Property="IsExpanded" Value="Binding IsExpanded, Mode=TwoWay" />
</Style>
</ResourceDictionary>
In runtime there isn't any problems, the style works fine as expected so it looks like design only error.
c# wpf xaml telerik
add a comment |
I have user control which define custom style for the telerik's control RadTreeViewItem
. The problem is that when I don't have x:key there isn't any errors but when I add the x:key property I've got error "The resource "RadTreeViewItemStyle" could not be resolved.
"
<ResourceDictionary>
<Style x:Key="MySuperGoodStyle" TargetType="telerik:RadTreeViewItem" BasedOn="StaticResource RadTreeViewItemStyle">
<Setter Property="IsSelected" Value="Binding IsSelected, Mode=TwoWay" />
<Setter Property="IsExpanded" Value="Binding IsExpanded, Mode=TwoWay" />
</Style>
</ResourceDictionary>
In runtime there isn't any problems, the style works fine as expected so it looks like design only error.
c# wpf xaml telerik
I have user control which define custom style for the telerik's control RadTreeViewItem
. The problem is that when I don't have x:key there isn't any errors but when I add the x:key property I've got error "The resource "RadTreeViewItemStyle" could not be resolved.
"
<ResourceDictionary>
<Style x:Key="MySuperGoodStyle" TargetType="telerik:RadTreeViewItem" BasedOn="StaticResource RadTreeViewItemStyle">
<Setter Property="IsSelected" Value="Binding IsSelected, Mode=TwoWay" />
<Setter Property="IsExpanded" Value="Binding IsExpanded, Mode=TwoWay" />
</Style>
</ResourceDictionary>
In runtime there isn't any problems, the style works fine as expected so it looks like design only error.
c# wpf xaml telerik
c# wpf xaml telerik
asked Mar 27 at 10:18
Milen GrigorovMilen Grigorov
8510 bronze badges
8510 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
try to add this before :
<Style TargetType="telerik:RadTreeViewItem" x:Key="RadTreeViewItemStyle">
<Setter Property="FocusVisualStyle" Value="StaticResource TreeviewFocusVisual"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="1 4 5 4"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="IsDropAllowed" Value="True"/>
<Setter Property="IsEnabled" Value="True"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapAndHold"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
<Setter Property="Template" Value="StaticResource TreeViewItemDefaultTemplate"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<telerik:TreeViewPanel VerticalAlignment="Bottom"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
and be sure to have in your header :
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Thanks for the help but it gave me error again. Anyway it looks like the bug fixes itself maybe it was bug in the VS and after restart it was fixed. I will give you best answer because you tried.
– Milen Grigorov
Mar 28 at 6:35
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374792%2fstyle-basedon-breaks-when-xkey-is-added%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
try to add this before :
<Style TargetType="telerik:RadTreeViewItem" x:Key="RadTreeViewItemStyle">
<Setter Property="FocusVisualStyle" Value="StaticResource TreeviewFocusVisual"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="1 4 5 4"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="IsDropAllowed" Value="True"/>
<Setter Property="IsEnabled" Value="True"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapAndHold"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
<Setter Property="Template" Value="StaticResource TreeViewItemDefaultTemplate"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<telerik:TreeViewPanel VerticalAlignment="Bottom"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
and be sure to have in your header :
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Thanks for the help but it gave me error again. Anyway it looks like the bug fixes itself maybe it was bug in the VS and after restart it was fixed. I will give you best answer because you tried.
– Milen Grigorov
Mar 28 at 6:35
add a comment |
try to add this before :
<Style TargetType="telerik:RadTreeViewItem" x:Key="RadTreeViewItemStyle">
<Setter Property="FocusVisualStyle" Value="StaticResource TreeviewFocusVisual"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="1 4 5 4"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="IsDropAllowed" Value="True"/>
<Setter Property="IsEnabled" Value="True"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapAndHold"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
<Setter Property="Template" Value="StaticResource TreeViewItemDefaultTemplate"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<telerik:TreeViewPanel VerticalAlignment="Bottom"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
and be sure to have in your header :
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Thanks for the help but it gave me error again. Anyway it looks like the bug fixes itself maybe it was bug in the VS and after restart it was fixed. I will give you best answer because you tried.
– Milen Grigorov
Mar 28 at 6:35
add a comment |
try to add this before :
<Style TargetType="telerik:RadTreeViewItem" x:Key="RadTreeViewItemStyle">
<Setter Property="FocusVisualStyle" Value="StaticResource TreeviewFocusVisual"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="1 4 5 4"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="IsDropAllowed" Value="True"/>
<Setter Property="IsEnabled" Value="True"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapAndHold"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
<Setter Property="Template" Value="StaticResource TreeViewItemDefaultTemplate"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<telerik:TreeViewPanel VerticalAlignment="Bottom"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
and be sure to have in your header :
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
try to add this before :
<Style TargetType="telerik:RadTreeViewItem" x:Key="RadTreeViewItemStyle">
<Setter Property="FocusVisualStyle" Value="StaticResource TreeviewFocusVisual"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="1 4 5 4"/>
<Setter Property="MinHeight" Value="24"/>
<Setter Property="IsDropAllowed" Value="True"/>
<Setter Property="IsEnabled" Value="True"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapAndHold"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
<Setter Property="Template" Value="StaticResource TreeViewItemDefaultTemplate"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<telerik:TreeViewPanel VerticalAlignment="Bottom"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
and be sure to have in your header :
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
answered Mar 27 at 11:14
ilièsiliès
292 bronze badges
292 bronze badges
Thanks for the help but it gave me error again. Anyway it looks like the bug fixes itself maybe it was bug in the VS and after restart it was fixed. I will give you best answer because you tried.
– Milen Grigorov
Mar 28 at 6:35
add a comment |
Thanks for the help but it gave me error again. Anyway it looks like the bug fixes itself maybe it was bug in the VS and after restart it was fixed. I will give you best answer because you tried.
– Milen Grigorov
Mar 28 at 6:35
Thanks for the help but it gave me error again. Anyway it looks like the bug fixes itself maybe it was bug in the VS and after restart it was fixed. I will give you best answer because you tried.
– Milen Grigorov
Mar 28 at 6:35
Thanks for the help but it gave me error again. Anyway it looks like the bug fixes itself maybe it was bug in the VS and after restart it was fixed. I will give you best answer because you tried.
– Milen Grigorov
Mar 28 at 6:35
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374792%2fstyle-basedon-breaks-when-xkey-is-added%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown