You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am making an app that allows users to change settings for another piece of software.
We provide a section at the top of "most commonly changed settings" that we know will get modified often, however we then have different sections on the page for specific areas. An IP Address is one that will get changed often so we have 2 IpFields added in our xaml, one in the common section, and one in the "Communication" section.
Both of these IpField controls are bound to the same property in the viewmodel called IpAddress.
The bug is that when I am typing into one of the IpFields, as soon as I enter a character, the IpField I was typing in loses focus, and then both IpFields have the single character that I typed in them, but I cannot type further without clicking into the control again.
My relevant xaml looks something like this and any advice you might have for this is super helpful:
<UserControld:DataContext="{d:DesignInstance Type=MyViewModel}">
<ExpanderName="CommonSettings">
<IpFieldIpAddress={Binding IpAddress}/>
</Expander
<!-- This expander is a section specifically for communication related controls -->
<ExpanderName="CommunicationSettings">
<!-- Notice I am binding to the same property as above on my view model-->
<IpFieldIpAddress={Binding IpAddress}/>
<!-- more controls related to communication -->
</Expander
<Expander Name="SomeMoreSettings">
<!-- more controls -->
</Expander
<!--
Note that there are MANY expanders here, and the common section above is meant to put a lot of the common settings
but that each individual section also has the settings as well
-->
</UserControl>
The text was updated successfully, but these errors were encountered:
Hi!
I change your code to :
<ip:IpField IpAddress="{Binding IpAddress , Mode=TwoWay}" />
and work
I fork this repository and update code and sample
check this on : https://github.com/omidmohajers/IPUserControls
Hi @omidmohajers, I will try to see if I can use your solution soon. From what I can tell on your example, only one of the IpFields is actually binding to the IpAddress property, but I am viewing it in my phone so maybe I missed something.
Hi!
I am making an app that allows users to change settings for another piece of software.
We provide a section at the top of "most commonly changed settings" that we know will get modified often, however we then have different sections on the page for specific areas. An IP Address is one that will get changed often so we have 2 IpFields added in our xaml, one in the common section, and one in the "Communication" section.
Both of these IpField controls are bound to the same property in the viewmodel called IpAddress.
The bug is that when I am typing into one of the IpFields, as soon as I enter a character, the IpField I was typing in loses focus, and then both IpFields have the single character that I typed in them, but I cannot type further without clicking into the control again.
My relevant xaml looks something like this and any advice you might have for this is super helpful:
The text was updated successfully, but these errors were encountered: