Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metroDialogSettings.CanChangeSizeToContent not work #909

Closed
TanJian opened this issue Jan 2, 2014 · 5 comments
Closed

metroDialogSettings.CanChangeSizeToContent not work #909

TanJian opened this issue Jan 2, 2014 · 5 comments

Comments

@TanJian
Copy link

TanJian commented Jan 2, 2014

我在代码中这样使用:

MetroDialogSettings setting = new MetroDialogSettings();
setting.CanChangeSizeToContent = false;
DialogManager.ShowMessageAsync(this, "TITLE", "MESSAGE", MessageDialogStyle.Affirmative, setting);

但是CanChangeSizeToContent 属性没有起作用,查看代码后发现,在DialogManager.cs的242行是这样写的:

if (window.MetroDialogOptions.CanChangeSizeToContent)
{
    window.SizeToContent = SizeToContent.Height;
}

代码中使用的是window.MetroDialogOptions,并不是我传入的setting。

So Sorry for my poor English.

I use this code:

MetroDialogSettings setting = new MetroDialogSettings();
setting.CanChangeSizeToContent = false;
DialogManager.ShowMessageAsync(this, "TITLE", "MESSAGE", MessageDialogStyle.Affirmative, setting);

But CanChangeSizeToContent property does not work, look at the code found in DialogManager.cs 242 line is written like this:

if (window.MetroDialogOptions.CanChangeSizeToContent)
{
window.SizeToContent = SizeToContent.Height;
}

Code using window.MetroDialogOptions, not my incoming setting.

By google translate.

@topvis
Copy link

topvis commented Jan 2, 2014

CanChangeSizeToContent will be removed in V4, refer to #901

@AzureKitsune
Copy link
Member

@TanJian I'm sorry about that. CanChangeSizeToContent is a workaround for some code I forgot to remove. I recommend that you do not use it because it will be removed in future versions with PR #901.

@TanJian
Copy link
Author

TanJian commented Jan 6, 2014

好的,谢谢。

@ye4241
Copy link

ye4241 commented Mar 5, 2014

狂汗的。。。

@TanJian
Copy link
Author

TanJian commented Mar 5, 2014

@ye4241 哈哈.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants