Note that there are some explanatory texts on larger screens.

plurals
  1. POTextbox not updating
    primarykey
    data
    text
    <p>Ive tried searching, but maybe im not using the right terms to search for.</p> <p>I have several textboxes that im using, and when i enter data, i see the values being updated when debugging, but they never get updated to the form.</p> <p>Basically, I have a form that is used for the visuals, and then i have a class that handles all the activity. I have created the class as a resource, and I am referencing to the resource within the textboxes. </p> <p>The only way that i really knew how to handle the updating of the forms was by implementing the calculations on values changing. So if I updated a property, I called the method from OnPropertyChanged(). This created issues because the values were always getting changed due to the calculations rewriting values. I then tried evaluating the changes of the new value</p> <p>I.E.</p> <pre><code>public double In1 { get{_return _in1;} set{ if (_in1 != value) _in1 = value; OnPropertyChanged("In1"); } } </code></pre> <p>regardless of anything, my problem is that i dont see the values getting written to the textbox. This is my first real endevour of using data binding so im assuming that im doing something incorrectly (clearly)</p> <pre><code>&lt;ad:DockableContent xmlns="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="DMC_Robot_Editor.GUI.frmAngleConvertor" Title="frmAngleConvertor" Height="259" Width="282"&gt; &lt;ad:DockableContent.Resources&gt; &lt;local:AngleConvertor x:Key="Converter"/&gt; &lt;/ad:DockableContent.Resources&gt; &lt;Grid &gt; &lt;GroupBox HorizontalAlignment="Stretch" VerticalAlignment="Top"&gt; &lt;Grid&gt; &lt;ComboBox x:Name="cbInput" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="1" DisplayMemberPath="ValueCartesianString" SelectedValuePath="ValueCartesianEnum" IsSynchronizedWithCurrentItem="True" SelectedIndex="{Binding InputItem,Source={StaticResource Converter}}" ItemsSource="{Binding InputConvention, Source={StaticResource Converter}}" IsReadOnly="True"/&gt; &lt;TextBox x:Name="tbIn1" HorizontalAlignment="Center" VerticalAlignment="Bottom" Text="{Binding In1, Converter={StaticResource DoubleToStringConverter}, Source={StaticResource Converter}}" Grid.Column="0" d:LayoutOverrides="GridBox" Grid.Row="2" Width="50" TextAlignment="Center"&gt; &lt;TextBox.DataContext&gt; &lt;local:AngleConvertor/&gt; &lt;/TextBox.DataContext&gt; &lt;/Grid&gt; &lt;/ad:DockableContent&gt; public class AngleConverter() { private double _in1 = 0.0; public double In1 { get{_return _in1;} set{ if (_in1 != value) _in1 = value; OnPropertyChanged("In1"); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload