TextBlock inside Textblock wont Bind to Data/show.
The following code works on WPF, but not in NoesisApp.
DataContext is set to the userconrol from code behind.
this works, cus it is working for other elements.
.xaml
DataContext is set to the userconrol from code behind.
this works, cus it is working for other elements.
.xaml
Code: Select all
<Grid Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Room: " Style="{StaticResource TextColor}" Grid.Column="1">
<TextBlock Text="{Binding Room[0].Name}" Style="{StaticResource TextColor}" Grid.Column="1"/>
</TextBlock>
<TextBlock Text="{Binding Room[0].Date}" Grid.Column="2" Style="{StaticResource TextColor}" TextAlignment="Right" Padding="20,0"></TextBlock>
</Grid>
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: TextBlock inside Textblock wont Bind to Data/show.
This is a bug in our parser that is not able to add inner TextBlock as an inline, you should be getting an error message about that:
In the meantime you can use a Run instead of a TextBlock for the inner text, I recommend to do that anyway because it is a bit more efficient:
In WPF the parser creates an InlineUIContainer to wrap the inner TextBlock so it can be added to the outer TextBlock. Could you please report this in our bugtracker and we will fix it in a future release?Can't add a 'TextBlock' to a 'InlineCollection'
In the meantime you can use a Run instead of a TextBlock for the inner text, I recommend to do that anyway because it is a bit more efficient:
Code: Select all
<TextBlock Text="Room: " Style="{StaticResource TextColor}" Grid.Column="1">
<Run Text="{Binding Room[0].Name}"/>
</TextBlock>
Who is online
Users browsing this forum: No registered users and 11 guests