Click here to Skip to main content
16,005,290 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Please help me in wpf/expression blend Pin
User 17164921-May-08 0:35
professionalUser 17164921-May-08 0:35 
GeneralRe: Please help me in wpf/expression blend Pin
Pete O'Hanlon1-May-08 1:01
mvePete O'Hanlon1-May-08 1:01 
GeneralRe: Please help me in wpf/expression blend Pin
User 17164921-May-08 1:09
professionalUser 17164921-May-08 1:09 
GeneralRe: Please help me in wpf/expression blend Pin
Jammer2-May-08 4:32
Jammer2-May-08 4:32 
QuestionText Ticker Pin
KBou28-Apr-08 2:07
KBou28-Apr-08 2:07 
GeneralRe: Text Ticker Pin
User 27100928-Apr-08 3:35
User 27100928-Apr-08 3:35 
GeneralRe: Text Ticker [modified] Pin
KBou29-Apr-08 3:38
KBou29-Apr-08 3:38 
GeneralRe: Text Ticker Pin
User 27100929-Apr-08 3:59
User 27100929-Apr-08 3:59 
KBou wrote:
I'll have to disagree with you on that one.



Everything done in XAML can be done in code. All XAML gets compiled into code.

Notice in the below example, the code just creates the same classes that the XAML does.

<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <StackPanel x:Name="LayoutRoot">
        <Label>
            <Underline>Some Text</Underline>
        </Label>
      </StackPanel>
</Window>


Class Window1 

    Private Sub Window1_Loaded(ByVal sender As Object, _
        ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded

        Dim lbl As New Label
        Dim und As New Underline
        und.Inlines.Add("Hi from Code!")
        lbl.Content = und
        Me.LayoutRoot.Children.Add(lbl)

    End Sub

End Class


Cheers, Karl

» CodeProject 2008 MVP
» Microsoft MVP - Client App Dev

My Blog | Mole's Home Page | MVP Profile

Just a grain of sand on the worlds beaches.



modified 27-Feb-21 21:01pm.

GeneralRe: Text Ticker Pin
KBou29-Apr-08 4:19
KBou29-Apr-08 4:19 
GeneralRe: Text Ticker Pin
User 27100929-Apr-08 4:31
User 27100929-Apr-08 4:31 
GeneralRe: Text Ticker Pin
KBou4-May-08 22:22
KBou4-May-08 22:22 
GeneralRe: Text Ticker Pin
User 2710095-May-08 0:05
User 2710095-May-08 0:05 
GeneralRe: Text Ticker Pin
KBou5-May-08 0:29
KBou5-May-08 0:29 
GeneralRe: Text Ticker Pin
User 2710095-May-08 0:46
User 2710095-May-08 0:46 
GeneralRe: Text Ticker Pin
KBou7-May-08 19:58
KBou7-May-08 19:58 
GeneralRe: Text Ticker Pin
User 2710097-May-08 23:21
User 2710097-May-08 23:21 
GeneralRe: Text Ticker Pin
KBou8-May-08 0:15
KBou8-May-08 0:15 
GeneralRe: Text Ticker Pin
User 2710098-May-08 0:20
User 2710098-May-08 0:20 
GeneralRe: Text Ticker Pin
KBou8-May-08 1:34
KBou8-May-08 1:34 
GeneralRe: Text Ticker Pin
User 2710098-May-08 2:33
User 2710098-May-08 2:33 
GeneralRe: Text Ticker Pin
KBou8-May-08 3:07
KBou8-May-08 3:07 
GeneralRe: Text Ticker Pin
User 2710098-May-08 3:23
User 2710098-May-08 3:23 
GeneralRe: Text Ticker Pin
KBou8-May-08 3:53
KBou8-May-08 3:53 
GeneralRe: Text Ticker Pin
KBou15-May-08 22:05
KBou15-May-08 22:05 
GeneralRe: Text Ticker Pin
User 27100916-May-08 0:10
User 27100916-May-08 0:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.