开发者

Value does not fall within an expected range

开发者 https://www.devze.com 2023-02-01 16:43 出处:网络
I got a silverlight 4 application which has a full MVVM design pattern implementation. Im trying to implement a silverlight toolkit theme.

I got a silverlight 4 application which has a full MVVM design pattern implementation. Im trying to implement a silverlight toolkit theme.

I got a view I place my code here like this

<toolkit:Theme x:Name="theme" DataContext="{StaticResource _frameContainerViewModel}" 
               ThemeUri="{Binding ThemeUri}">

some code here

in my ViewModel, I change its ThemeUri property

ThemeUri = new Uri("/System.Windows.Controls.Theming.BubbleCreme;component/Theme.xaml", UriKind.RelativeOrAbsolute);

after the code step through in my ThemeUri property error pops value does not fall within expected range.

Thank y开发者_开发知识库ou


Hi
I had problem like your but with binding to image source and solved this way:
public string ThemeUri
{
get; set;
}
// inside some function
ThemeUri = (new Uri("/System.Windows.Controls.Theming.BubbleCreme;component/Theme.xaml", UriKind.Relative)).OriginalString;

0

精彩评论

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