开发者

Accessing static resource listbox by name

App.xaml
<Application.Resources>
. . . .
<StackPanel>
<ItemsPresenter/>
<ListBox x:Name="comm_box" ItemsSource="{Binding}">
. .. .
</Application.Resources>

error: comm_box doesn't exist in current context

How to resolve this problem? I have listbox-news and listbox-comm开发者_StackOverflow中文版ents that shows after listbox-news But I can't set comm_box.Itemssource because comm_box is invisible. Please help me. http://pastebin.com/DERdgHJ9


Try Application.Current.Resource["comm_box"]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜