View Poll Results: Do you clean your Xaml?
- Voters
- 5. You may not vote on this poll
-
Jan 26th, 2009, 02:46 PM
#1
Thread Starter
Frenzied Member
Do you clean your Xaml?
Consider the designer's Xaml?
PHP Code:
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="VB:e Syntax Highlighter" Height="300" Width="371" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" ResizeMode="NoResize">
<Grid Width="349">
<ComboBox Height="23" Margin="12,0,0,12" Name="ComboBox1" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="120" Background="WhiteSmoke">
<ComboBoxItem>Visual Basic</ComboBoxItem>
<ComboBoxItem>WPF Xaml</ComboBoxItem>
<ComboBoxItem>C#</ComboBoxItem>
</ComboBox>
<ComboBox Height="23" Margin="0,0,91,12" Name="ComboBox2" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="120" Background="WhiteSmoke" BorderBrush="#FF707070" BorderThickness="1">
<ComboBoxItem>HTML</ComboBoxItem>
<ComboBoxItem>BB Codebox</ComboBoxItem>
</ComboBox>
<Button Height="23" HorizontalAlignment="Left" Margin="264,0,0,12" Name="Button1" VerticalAlignment="Bottom" Width="75" Background="WhiteSmoke">Go!</Button>
<Label Height="28" HorizontalAlignment="Left" Margin="12,0,0,32" Name="Label1" VerticalAlignment="Bottom" Width="120" VerticalContentAlignment="Bottom">Source:</Label>
<Label Height="28" Margin="138,0,91,32" Name="Label2" VerticalAlignment="Bottom" VerticalContentAlignment="Bottom">Output:</Label>
<RichTextBox Height="194" Margin="10,10,12,58" Name="RichTextBox1" Width="327" />
</Grid>
</Window>
-
Jan 26th, 2009, 02:47 PM
#2
Thread Starter
Frenzied Member
Re: Do you clean your Xaml?
I ask because I wanted to know if you found it helped you learn xaml better?
-
Jan 26th, 2009, 02:56 PM
#3
Re: Do you clean your Xaml?
I dont get ya, do you mean do we go through and delete what the designer has put in there?
-
Jan 26th, 2009, 02:58 PM
#4
Thread Starter
Frenzied Member
Re: Do you clean your Xaml?
Yeah if its not needed, like names and that also, do you format your xaml to make it more readable?
-
Jan 26th, 2009, 03:02 PM
#5
Re: Do you clean your Xaml?
One thing I dont like about the XAML editor is that it does not tidy itself up like the VB editor. I mean it doesnt insert tabs in the right places automatically when you delete something to make it more readable like it would in VB.NET code. So yes, I do spend a fair amount of time tidying up my XAML to make it more readable... but then I delete some of it and have to spend ages tidying it up again so get bored of that quite quickly and it becomes a mess again
I dont find that the designer sticks much unnecessary stuff in there to be honest so I rarely actually remove something the designer has inserted as that usually brakes something :P
-
Jan 26th, 2009, 03:06 PM
#6
Re: Do you clean your Xaml?
I use the split view a lot.... when I'm messing with the properties, I tend to jsut do it right in the XAML rather than the properties window... So far I haven't found anything unnecessary, unlike what I get when I build a webform in VS. So far, I haven't experienced a problem with the indents eitehr, but then I've only scratched the surface.
-tg
-
Jan 26th, 2009, 03:10 PM
#7
Thread Starter
Frenzied Member
Re: Do you clean your Xaml?
I like to work with the Xaml too but felt that maybe I was overdoing it simply because I tend to hook events and set properties in Xaml. I just find it a good idea to clean as I go reagarding the Xaml of a window.
-
Jan 26th, 2009, 03:13 PM
#8
Re: Do you clean your Xaml?
Yeah I use the split view all the time, and I do try to do as much in XAML as I can as thats the whole idea of it really isnt it, to keep all the UI stuff in there. However at the moment as I am not particularly adept I do have to admit to using the MouseEnter and MouseLeave events in my code-behind file instead of XAML triggers for some controls :P You just get that little extra bit of control as you can do things like check to see if an animation is already running and check other variable values etc
-
Jan 26th, 2009, 03:16 PM
#9
Thread Starter
Frenzied Member
Re: Do you clean your Xaml?
I agree, I also would like to stress the idea of the code behind is still to enhance the UI. I tend to pass the logic of to other objects outside of the window declaration, that way I don't feel as guilty writing code behind ha ha!
-
Jan 27th, 2009, 02:52 AM
#10
Hyperactive Member
Re: Do you clean your Xaml?
I try to do everything in the XAML, but I'm stilll very new to WPF, so sometimes I have to find other ways to find out how I can do what I want to do. But clean up the XAML? Most certainly....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|