开发者

TimHeuer's FloatableWindow Issue

开发者 https://www.devze.com 2022-12-18 14:42 出处:网络
I\'ve some trouble with Tim\'s FloatableWindow. (<--SourceCode & DLLs) It throws the following Exception once closed the control.

I've some trouble with Tim's FloatableWindow. (<--SourceCode & DLLs)

It throws the following Exception once closed the control.

Object reference not set to an instance of an object

in System.Windows.Controls.FloatableWindow.b__0(Object s, EventArgs args)

in System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)

in MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

First I created a control by using the FloatableWindow template, And then i just created the Window on CodeBehind.

 private void Button_Click_1(object sender, RoutedEventArgs e)
    {

        FloatableWindow1 f1 = new FloatableWindow1();//TheTemplatedOne
     开发者_高级运维   f1.ShowDialog();
    }

    private void Button_Click_2(object sender, RoutedEventArgs e)
    {
        FloatableWindow f = new FloatableWindow();
        f.Height = 100;
        f.Width = 100;
        f.Background = new SolidColorBrush(Colors.Yellow);
        f.ShowDialog();
    }

But stills the same issue...

Im not trying to access any information on the Closed EventHandler.

Im running v3.0.40624.4 Release of the dll on SL v3.0.50106.0 in a C# project w/RiaServices

Thanks


It solved by setting up the ParentLayout Property

f.ParentLayoutRoot = this.LayoutRoot;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号