Click here to Skip to main content
15,913,685 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: XamlParseException at startup under debug Pin
Gary Wheeler21-Jul-09 9:20
Gary Wheeler21-Jul-09 9:20 
GeneralRe: XamlParseException at startup under debug Pin
Mark Salsbery21-Jul-09 9:41
Mark Salsbery21-Jul-09 9:41 
GeneralRe: XamlParseException at startup under debug Pin
Gary Wheeler21-Jul-09 9:52
Gary Wheeler21-Jul-09 9:52 
QuestionHow to get Windows-wide DPI Scaling number within WPF Pin
fjparisIII20-Jul-09 7:47
fjparisIII20-Jul-09 7:47 
AnswerRe: How to get Windows-wide DPI Scaling number within WPF Pin
Ian Shlasko20-Jul-09 10:09
Ian Shlasko20-Jul-09 10:09 
GeneralRe: How to get Windows-wide DPI Scaling number within WPF Pin
fjparisIII20-Jul-09 12:20
fjparisIII20-Jul-09 12:20 
GeneralRe: How to get Windows-wide DPI Scaling number within WPF [SOLVED] Pin
fjparisIII21-Jul-09 11:27
fjparisIII21-Jul-09 11:27 
QuestionTrying to understand the logical tree and ItemsControl problem Pin
Super Lloyd20-Jul-09 3:19
Super Lloyd20-Jul-09 3:19 
My problem is 3 fold.

1. I'm not sure what is exactly the logical tree and its impact on WPF. what's in it?
I'm using mole to drill down my UI and, to my surprise, big chunk of it seems to be missing (i.e. plenty of my object hierarchy is not there)...

2. I also wonder how does the logical tree affect DependencyProperty. I was trying to have some inherited dependency property in my object. But they were not inherited. I suspedted it might be because of the (more empty that it should) logical tree and, after some googling, I found out that inherited attached property cross logical tree boundary, which it did. But it still looks like magic to me, can anyone clarify?

3. I have a simple test application (below) but when I explore my logical tree of my window (with a break point in the button event handler) (thanks Mole for making it easy!) it stops at the ItemsControl, which has no logical child!
How could I make sure my ItemsControl do have logical child?

Here is a sample test code

Window1.xaml
<Window<br />
	x:Class="LC.Window1"<br />
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br />
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br />
	xmlns:local="clr-namespace:LC"<br />
    Title="Window1" Height="300" Width="300"><br />
	<DockPanel><br />
		<br />
		<Button Click="ButtonClick" Content="Foo" DockPanel.Dock="Bottom"/><br />
		<br />
		<ItemsControl x:Name="pavlova"><br />
			<ItemsControl.ItemsPanel><br />
				<ItemsPanelTemplate><br />
					<Canvas<br />
					HorizontalAlignment="Stretch" <br />
					VerticalAlignment="Stretch"<br />
					/><br />
				</ItemsPanelTemplate><br />
			</ItemsControl.ItemsPanel><br />
			<ItemsControl.ItemTemplate><br />
				<DataTemplate DataType="{x:Type local:Boo}"><br />
					<Border<br />
					BorderBrush="Black"<br />
					BorderThickness="1"<br />
						CornerRadius="3"<br />
					><br />
						<TextBlock Text="{Binding Text}"/><br />
					</Border><br />
				</DataTemplate><br />
			</ItemsControl.ItemTemplate><br />
			<ItemsControl.ItemContainerStyle><br />
				<Style><br />
					<Setter Property="Canvas.Top" Value="{Binding X}"/><br />
					<Setter Property="Canvas.Left" Value="{Binding Y}"/><br />
				</Style><br />
			</ItemsControl.ItemContainerStyle><br />
		</ItemsControl><br />
<br />
	</DockPanel><br />
</Window>


Window1.xaml.cs
    public partial class Window1 : Window<br />
    {<br />
        public Window1()<br />
        {<br />
            InitializeComponent();<br />
<br />
			var l = new List<Boo>();<br />
			l.Add(new Boo { X = 1, Y = 1, Text = "sahjk" });<br />
			l.Add(new Boo { X = 1, Y = 100, Text = "ew hyhj" });<br />
			l.Add(new Boo { X = 25, Y = 150, Text = "egje r09uy798" });<br />
<br />
			pavlova.ItemsSource = l;<br />
		}<br />
<br />
		private void ButtonClick(object sender, RoutedEventArgs e)<br />
		{<br />
<br />
		}<br />
    }<br />


Boo.cs
public class Boo<br />
{<br />
    public double X { get; set; }<br />
    public double Y { get; set; }<br />
    public string Text { get; set; }<br />
}<br />


A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

QuestionWPF +WCF Pin
bhavna432120-Jul-09 1:51
bhavna432120-Jul-09 1:51 
AnswerRe: WPF +WCF Pin
Kunal Chowdhury «IN»20-Jul-09 1:56
professionalKunal Chowdhury «IN»20-Jul-09 1:56 
GeneralRe: WPF +WCF Pin
bhavna432120-Jul-09 2:16
bhavna432120-Jul-09 2:16 
GeneralRe: WPF +WCF Pin
Kunal Chowdhury «IN»21-Jul-09 3:01
professionalKunal Chowdhury «IN»21-Jul-09 3:01 
AnswerRe: WPF +WCF Pin
Jammer20-Jul-09 5:34
Jammer20-Jul-09 5:34 
AnswerRe: WPF +WCF Pin
Vijaykishan21-Jul-09 0:15
Vijaykishan21-Jul-09 0:15 
QuestionHow to make groupbox invisble on select of a radiobutton Pin
Krishna Aditya19-Jul-09 20:34
Krishna Aditya19-Jul-09 20:34 
AnswerRe: How to make groupbox invisble on select of a radiobutton Pin
Kunal Chowdhury «IN»19-Jul-09 21:00
professionalKunal Chowdhury «IN»19-Jul-09 21:00 
AnswerRe: How to make groupbox invisble on select of a radiobutton Pin
#realJSOP20-Jul-09 0:23
professional#realJSOP20-Jul-09 0:23 
QuestionWPF: Is there any Flip Book Control available? Pin
Kunal Chowdhury «IN»19-Jul-09 20:08
professionalKunal Chowdhury «IN»19-Jul-09 20:08 
AnswerRe: WPF: Is there any Flip Book Control available? Pin
Pete O'Hanlon19-Jul-09 22:18
mvePete O'Hanlon19-Jul-09 22:18 
QuestionDeriving new class [modified] Pin
#realJSOP18-Jul-09 2:08
professional#realJSOP18-Jul-09 2:08 
QuestionWPF Call to WCF Service - Sessions? Pin
jeremyadell17-Jul-09 14:47
jeremyadell17-Jul-09 14:47 
AnswerRe: WPF Call to WCF Service - Sessions? Pin
Mark Salsbery18-Jul-09 7:09
Mark Salsbery18-Jul-09 7:09 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
jeremyadell18-Jul-09 9:57
jeremyadell18-Jul-09 9:57 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
Mark Salsbery18-Jul-09 16:59
Mark Salsbery18-Jul-09 16:59 
GeneralRe: WPF Call to WCF Service - Sessions? Pin
jeremyadell18-Jul-09 17:28
jeremyadell18-Jul-09 17:28 

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.