I am using ChildWindow (Silverlight) which also includes some expanding controls. In a case where expansion control spreads , Then the hair spreads beneath the bottom of the screen under the window, but still leaves the place at the top
how can I change the position of a child's window to focus it on the screen , As if I opened the babywindows? (It would be easy, but I think it is not worth doing)
(Manual Intervention) I have gone through the RendererResource of the Root of the Content, and I have six changes in that collection, in which There are 2 transrapors. If I update the earlier X / Y properties (I do not know in which I should be replaced) and update the RenderTransform property with the complete Transform group, I have had success in transferring ChildWindow around the screen - But this is not what I'm expecting, I'm behaving.
I do not even know why the hair window size is not a changed event, when the expander control spreads, the window size changes, so why not?
OK - there are so many questions, first you need to answer, fill out my knowledge about how WPF / Silverlight is working
Regards, Richard < / P>
Answer via this blog:
/// & lt ; Summary & gt; Silverlight focuses on hair window in the /// screen. /// & lt; / Summary & gt; /// & lt; Comment & gt; /// 1) Visual Tree Helper will capture the first element within a child window - it is chrome (title bar, close button, etc.) /// 2) Content Root - The first element within Chrome for that child is - Which is given its name in the control template (childwind) /// 3) Container use (named content right), remove all "conversions", which changes the layout, or layout of the control, / TRANSFORM TRANSFORM - X, Y offers transfers Using the last transatlant transformation from the transform group using a linux expression from AM group / 5/5. 5) Reset tutorial transformer to 0,0, in which the child window should be left-top-left. Window. However, this setting is /// Perhaps the window window overrides with the default size to reset the window in the middle, depending on its size and the size of the browser /// I used to like it live, but This possibility requires a storyboard event which I do not have time for this time. /////// The entire process of transferring a window into a WPF, or changing the experience was a total learning experience. /// & lt; / Comment & gt; /// & lt; Param name = "childwindow" & gt; Hair window public static zero center in-screen (this childwindow child wandow) {var root = VisualTreeHelper.GetChild (childWindow, 0) as a framework element; If (root == zero) {return; } Var contentRoot = root.FindName ("ContentRoot") as FrameworkElement; If (contentRoot == zero) {return; } Var transfergroup = content ret Transderge as Transform Group; If (transform group == empty) {return; } Transform Transform = Transform. Child. OFTIP & lt; Translation Transforms & gt; (). LastOrDefault (); If (change == zero) {return; } Transform.X = 0; Conversion Y = 0; } }
Comments
Post a Comment