Working on a Sl projrect where thats lots of stuff in SQL Server that we need to turn into XAML for the UI. So check out this sql that spins out SL controls. Tweak the xaml a bit and there you go:
DECLARE @NewLineChar AS CHAR(2) = CHAR(13) + CHAR(10) SELECT '<CheckBox x:Name="'+ REPLACE( REPLACE( REPLACE( REPLACE([MemberServiceTypeName], ' ', '' ), '/', '' ), '-', '' ), '', '' ) + 'CheckBox" Grid.Row="1" Grid.Column="1" d:LayoutOverrides="Height" IsChecked="{Binding xxx, Mode=TwoWay}" ToolTipService.ToolTip="" />' + @NewLineChar + '<TextBlock Grid.Row="2" Grid.Column="0" Height="23" Text="' + [MemberServiceTypeName] + '?" Style="{StaticResource EntryDescription}" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="5,4,0,3" Width="278" />' as code FROM LookTable01
Latest posts by Ken Spencer (see all)
- Automating software development - October 7, 2014
- Uses for SQL Server 2014 - May 21, 2014
- Query to find in-memory tables in SQL Server 2014 database - April 29, 2014