home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
Xaml question
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="osre" data-source="post: 1131428" data-attributes="member: 150866"><p>You have to add the source to your binding like this:</p><p>[CODE=XML]Text="{Binding Source={StaticResource Model}, Path=TestEdit, Mode=TwoWay}"[/CODE]</p><p>where the model resource is defined like this in your screen:</p><p>[CODE=XML]</p><p><Screen.Resources></p><p><Model x:Key="Model" Id="F4FC1599-F412-40d0-82BF-46FC352E93BE"/></p><p>...[/CODE]</p><p>Also if you want to update the textbox when the property changes, then you need to define it as an WProperty (there are some in GUITestModel).</p><p></p><p>A button should be defined like this:</p><p>[CODE=XML]</p><p><Button Style="{StaticResource ButtonWideStyle}" Content="My button"</p><p>Command="{Command Source={StaticResource Model},Path=MyButtonHandler}"/>[/CODE]</p><p></p><p>With a handler like this:</p><p>[CODE=C#]public void MyButtonHandler()[/CODE]</p><p>in the GUITestModel.</p></blockquote><p></p>
[QUOTE="osre, post: 1131428, member: 150866"] You have to add the source to your binding like this: [CODE=XML]Text="{Binding Source={StaticResource Model}, Path=TestEdit, Mode=TwoWay}"[/CODE] where the model resource is defined like this in your screen: [CODE=XML] <Screen.Resources> <Model x:Key="Model" Id="F4FC1599-F412-40d0-82BF-46FC352E93BE"/> ...[/CODE] Also if you want to update the textbox when the property changes, then you need to define it as an WProperty (there are some in GUITestModel). A button should be defined like this: [CODE=XML] <Button Style="{StaticResource ButtonWideStyle}" Content="My button" Command="{Command Source={StaticResource Model},Path=MyButtonHandler}"/>[/CODE] With a handler like this: [CODE=C#]public void MyButtonHandler()[/CODE] in the GUITestModel. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Xaml question
Contact us
RSS
Top
Bottom