Nevron Forum

PredefineFrame not change

https://www.nevron.com/Forum/Topic3020.aspx

By JSW W. - Thursday, February 4, 2010

Hello
When I have already opened Mdistandard documents.
Setting NUIdocument.predefinedframe to something won't take effect on document frame.

What is workaround?
By JSW W. - Thursday, February 4, 2010

Actually it was SETpredefinedFrame.
And also the effect sometimes took effect sometimes don't.

 

I have trial and error around and by doing

m_DockManager.DocumentStyle.DocumentViewStyle = DocumentViewStyle.MdiStandard

change away from MdiStandard and then change it back again - will update the document frame.

However, doing so I lost position/size of mdistandard document windows.
So I am going to open different question.

 

I thought i have solved it but if i turn on skin e.g. macskin...
When change to another skin the mdistandard doc will still be in Macskin frame

By Angel Chorbadzhiev - Thursday, February 4, 2010

Hello JSW W.,

The correct way to setup a predefined frame on a MdiStandard NUIdocument is the following:

NUIDocument doc = new NUIDocument();

NMdiChild host = doc.Host as NMdiChild;

if (host != null)

{

    NFrameAppearance frameAppearance = NUIManager.GetPredefinedFrame(PredefinedFrame.Simple);

    host.FrameAppearance = frameAppearance;

}

Regards,

Angel.

 

By JSW W. - Thursday, February 4, 2010

This solution works when we disable skin.
When enable skin, the first skin will define the frame looks.

However, your example did not have the same result, the frame change perfectly.

Thanks,