From: tshad on
I was curious as to why in a DockPanel, if you set DockPanel.Dock="Left" -
it puts the object in the middle???

For example, I have 2 objects and one is .Dock="Top" and another that has
..Dock="Left". The 1st object is correctly at the top, but the next object
ends up in the middle.

<Window x:Class="FontViewer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Font Viewer" Height="480" Width="600">
<DockPanel>
<Border DockPanel.Dock="Top"
CornerRadius="6"
BorderThickness="1"
BorderBrush="Gray"
Background="LightGray"
Padding="8"
Margin="0 0 0 8">
<TextBlock FontSize="14"
TextWrapping="Wrap">
Select a font to view from the list below.
You can change the text by typing in the region at the
bottom
</TextBlock>
</Border>
<ListBox x:Name="FontList"
DockPanel.Dock="Left"
ItemsSource="{x:Static Fonts.SystemFontFamilies}"
Width="160" />

</DockPanel>
</Window>

If I add a TextBlock with a DockPanel.Dock="Bottom", it doesn't go to the
bottom but to the right of the ListBox????

<Window x:Class="FontViewer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Font Viewer" Height="480" Width="600">
<DockPanel>
<Border DockPanel.Dock="Top"
CornerRadius="6"
BorderThickness="1"
BorderBrush="Gray"
Background="LightGray"
Padding="8"
Margin="0 0 0 8">
<TextBlock FontSize="14"
TextWrapping="Wrap">
Select a font to view from the list below.
You can change the text by typing in the region at the
bottom
</TextBlock>
</Border>
<ListBox x:Name="FontList"
DockPanel.Dock="Left"
ItemsSource="{x:Static Fonts.SystemFontFamilies}"
Width="160" />
<TextBox x:Name="SampleText"
DockPanel.Dock="Bottom"
MinLines="4"
Margin="8 0"
TextWrapping="Wrap"
ToolTip="Type here to change the preview text.">

</TextBox>
</DockPanel>
</Window>

Thanks,

Tom


From: Olaf Rabbachin on
Hi tshad,

> I was curious as to why in a DockPanel, if you set DockPanel.Dock="Left" -
> it puts the object in the middle???
>
> For example, I have 2 objects and one is .Dock="Top" and another that has
> .Dock="Left". The 1st object is correctly at the top, but the next object
> ends up in the middle.

that's because the DockPanel uses the last element to fill the window by
default. Adding a ...
LastChildFill="False"
.... to the DP's properties will disable that behaviour.

BTW - this (an ASP.Net NG) is not the right place for WPF questions. You
might want to go to the WPF-forums:
http://social.msdn.microsoft.com/Forums/en-US/wpf/threads

Cheers,
Olaf
From: tshad on
"Olaf Rabbachin" <Olaf_NoSpam(a)IntuiDev.com> wrote in message
news:uFF3vTgjKHA.4048(a)TK2MSFTNGP06.phx.gbl...
> Hi tshad,
>
>> I was curious as to why in a DockPanel, if you set
>> DockPanel.Dock="Left" -
>> it puts the object in the middle???
>>
>> For example, I have 2 objects and one is .Dock="Top" and another that has
>> .Dock="Left". The 1st object is correctly at the top, but the next
>> object
>> ends up in the middle.
>
> that's because the DockPanel uses the last element to fill the window by
> default. Adding a ...
> LastChildFill="False"
> ... to the DP's properties will disable that behaviour.
>
> BTW - this (an ASP.Net NG) is not the right place for WPF questions. You
> might want to go to the WPF-forums:
> http://social.msdn.microsoft.com/Forums/en-US/wpf/threads
>

I couldn't find a newsgroup for WPF before.

I normally use msnew.microsoft.com but there doesn't seem to be a newsgroup
for wpf there.

They are normally microsoft.public.x and the closest I could find was
microsoft.public.dotnet.framework.aspnet.

Thanks,

Tom

> Cheers,
> Olaf


From: Olaf Rabbachin on
Hi Tom,

tshad wrote:

> I couldn't find a newsgroup for WPF before.
>
> I normally use msnew.microsoft.com but there doesn't seem to be a newsgroup
> for wpf there.
>
> They are normally microsoft.public.x and the closest I could find was
> microsoft.public.dotnet.framework.aspnet.

it seems that MS is sort of abandoning the NNTP-newsgroups. You won't find
any related to the "newer" technologies, hence you'll probably be bound to
use the forums instead. A shame, if you ask me.

Cheers,
Olaf
From: tshad on

"Olaf Rabbachin" <Olaf_NoSpam(a)IntuiDev.com> wrote in message
news:eG$UOEKkKHA.2160(a)TK2MSFTNGP02.phx.gbl...
> Hi Tom,
>
> tshad wrote:
>
>> I couldn't find a newsgroup for WPF before.
>>
>> I normally use msnew.microsoft.com but there doesn't seem to be a
>> newsgroup
>> for wpf there.
>>
>> They are normally microsoft.public.x and the closest I could find was
>> microsoft.public.dotnet.framework.aspnet.
>
> it seems that MS is sort of abandoning the NNTP-newsgroups. You won't find
> any related to the "newer" technologies, hence you'll probably be bound to
> use the forums instead. A shame, if you ask me.

I agree.

I have a problem with the forums because I can't remember which ones I am on
and I usually access them from different locations. I usually use outlook
express to access them and I can go directly to msnew.microsoft.com to see
all my messages.

Thanks,

Tom

>
> Cheers,
> Olaf