- Mikael Gyth
- Posts: 33
- Joined:
Support for StringFormat and MultiBinding?
Does Noesis support StringFormat and MultiBinding?
I've attempted to do it but got nothing, no text or errors.
Code: Select all
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="Full Name {0} {1}">
<Binding Path="FirstName" />
<Binding Path="LastName" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
-
sfernandez
Site Admin
- Posts: 3095
- Joined:
Re: Support for StringFormat and MultiBinding?
Hi Mikael,
MultiBinding is not supported. We have it in our feature request list, but is not yet planned in our upcoming releases. I tried to add a xaml containing a MultiBinding, and when it was parsed a warning message was shown in Unity console, are you getting this message also?:
Will use two decimals to represent the width of the first text.
We will add more information to the documentation of StringFormat class to show what exactly is available.
MultiBinding is not supported. We have it in our feature request list, but is not yet planned in our upcoming releases. I tried to add a xaml containing a MultiBinding, and when it was parsed a warning message was shown in Unity console, are you getting this message also?:
StringFormat is partially implemented. You can use it to determine the representation of numbers, for example:[DX9] Assets/NoesisGUI/Samples/_Tests/_Test/_Test.xaml
Ignoring unknown object 'MultiBinding' (@7,12)
Code: Select all
<TextBlock x:Name="txt" Text="Hello world!" HorizontalAlignment="Left" FontSize="20"/>
<TextBlock Text="{Binding ActualWidth, ElementName=txt, StringFormat=F2}" Margin="0,30"/>
We will add more information to the documentation of StringFormat class to show what exactly is available.
Re: Support for StringFormat and MultiBinding?
One of the reasons we didn't implement MultiBinding was that Silverlight didn't support it (and I see that Metro doesn't support it either http://dotnet.dzone.com/articles/8-quir ... ows-8-xaml).
But we think it is a good opportunity to offer a better implementation of StringFormat. We will be working on it for the next release (1.0.5)
But we think it is a good opportunity to offer a better implementation of StringFormat. We will be working on it for the next release (1.0.5)
Re: Support for StringFormat and MultiBinding?
We have improved the implementation of StringFormat to allow things like this:
We support the following formats: C, D, E, F, G, N, P, X and corresponding precision value.
This will be available in NoesisGUI v1.0.5, the next week.
Code: Select all
<TextBlock Text="{Binding Amount, StringFormat={}{0:D}}" />
<TextBlock Text="{Binding Amount, StringFormat=Total: {0:D}}" />
<TextBlock Text="{Binding Amount, StringFormat=Total: {0:D} units}" />
This will be available in NoesisGUI v1.0.5, the next week.
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests