TextBox, ComboBox, etc binding issues
See original GitHub issueAfter update from 3.6.1.236 to 5.0.0.8 a lot of code has been broken Some samples that works perfect on 3.6.1.236 and not work on 5.0.0.8
In this sample binding to Text doesn’t work
<fluent:TextBox SizeDefinition="Small"
Width="40"
Name="FontSizeTextBox"
Text="{Binding Font.Size, Mode=TwoWay}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="TextChanged">
<i:InvokeCommandAction Command="{Binding FontSizeCommand}"
CommandParameter="{Binding Text, ElementName=FontSizeTextBox, Converter={StaticResource StringToIntConverter}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</fluent:TextBox>
In this sample binding to SelectedValue doesn’t work
<fluent:ComboBox Name="FontFamilyCombobox"
SizeDefinition="Small"
Width="110"
MaxDropDownHeight="500"
Style="{StaticResource SystemFontCombobox}"
SelectedValuePath="Source"
SelectedValue="{Binding Font.Family, Mode=OneWay}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding FontFamilyCommand}"
CommandParameter="{Binding ElementName=FontFamilyCombobox, Path=SelectedItem.Source}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</fluent:ComboBox>
Environment
- Fluent.Ribbon v5.0.0.8
- Windows Server 2012R2
- .NET Framework 4.6.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:41 (22 by maintainers)
Top Results From Across the Web
c# - Can I force an update to a Textbox DataContext bound ...
When a user issues an Undo Command and the item to be undone is the textual changes of a text box, I want...
Read more >data not binding to controls like TextBox,Combobox...etc... ...
I am not able to bind the data to controls like TextBox,Combobox...etc... inside ASPxPopupControl while PerformCallback from javascript ...
Read more >combo box problem
I have a table with many records in fields Industry, State, Contract, Title, First_Name, Last_Name, etc. i filled the values of contract in ......
Read more >Bind a linq query to a combo box's text only, without ...
It seems to be only the comboboxes that cause a record change. The text boxes, and Trackbars seem to behave normally. My question...
Read more >Check if Textbox Text in a ComboBox - Forums
What I want to do is check to see if the value of the bound textbox of Type is one of the types...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, now i found out why the behavior changed. In version 3.6 the TextBox in Fluent.Ribbon inherited from RibbonControl and contained a TextBox. Somewhere between that version and version 5.0 the inheritance changed from RibbonControl to TextBox, thus no longer containing a separate TextBox. This change then reveals the bug in System.Windows.Interactivity.
You can use the following code, which is a fixed/modified version of InovkeCommandAction from System.Windows.Interactivity:
The line that solves your issue is:
@punker76 we can’t know about view elements in view model. Generally we don’t speak about MVVM 😃