MultiBind on Textblock Text field fails in UWP
See original GitHub issueNoticed that a multibind will fail consistently for me when bound in UWP to the Text field of a TextBlock, noting: Unhandled exception at 0x7757DF95 (combase.dll).
Sample code:
<TextBlock Foreground="AntiqueWhite" FontSize="12" FontWeight="Bold" Text="13.41">
<Interactivity:Interaction.Behaviors>
<cimba:MultiBindingBehavior Converter="{StaticResource IntToValConverter}"
PropertyName="Text" >
<cimba:MultiBindingItem Value="{Binding StepValue}"/>
</cimba:MultiBindingBehavior>
</Interactivity:Interaction.Behaviors>
</TextBlock>
And the Converter:
public class IntToValConverter : MultiValueConverterBase
{
public override object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
if (null == values[0]) return "haha";
return "hoho";
}
public override object[] ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
MultiBind on Textblock Text field fails in UWP · Issue #52
Noticed that a multibind will fail consistently for me when bound in UWP to the Text field of a TextBlock, noting: Unhandled exception...
Read more >Multi binding in UWP - xaml
A TextBlock item can consist of several "runs" of text which can bind to different properties. The runs will behave like inline elements....
Read more >TextBox Binding doesn't work while focused (when using ...
TextBox Binding doesn't work while focused (when using uwp datagrid) The problem is when the user clicks save (a button on the command...
Read more >How to bind fontsize of a textblock from two different ...
But I want to scale the Text at a specific Font Size because in Segoe UI, different Font Size have different letter looks...
Read more >Comparison of Avalonia with WPF and UWP
Indicates the platform (defined by the Avalonia, WPF or UWP column) has the ... This allows for easily changing textbox direction and then...
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
Given it only happens on Release mode, we can safely assume this is due to .NET Native optimizations… I’m not sure I’ll be able to fix this on my side, but I think I have a solution for this specific case!
Add this to your app
Default.rd.xml
file, rebuild and try again:Yep, I don’t think I’ll be able to do “magic” stuff over this one, but I’m hoping Microsoft might! 😉
In the meantime, here’s something to read on the subject if you want to!