이 실제로 저를 도청 한 무언가이다 동안. 일단 내가 알아 냈어, 내가 그걸 빨리 알아 내지 못했어.
caliburn에 창을 표시 할 때 Window 개체를 호출 할 때 특성을 설정할 수 있습니다.
public class ShellViewModel : PropertyChangedBase, IShell
{
private readonly IWindowManager windowManager;
public ShellViewModel()
{
this.windowManager = new WindowManager();
this.windowManager.ShowWindow(new LameViewModel());
}
}
이 두 가지가 있습니다,이 같은 뭔가
먼저 시작할 것 :
그래서, 당신은 600 × 300 창에 높이와 너비를 설정하려는 말할 수 ShowWindow 메서드의 다른 필드 세 번째 매개 변수를 사용하면 Window 객체의 속성을 동적으로 설정할 수 있습니다.
public class ShellViewModel : PropertyChangedBase, IShell
{
private readonly IWindowManager windowManager;
public ShellViewModel()
{
this.windowManager = new WindowManager();
dynamic settings = new ExpandoObject();
settings.Height = 600;
settings.Width = 300;
settings.SizeToContent = SizeToContent.Manual;
this.windowManager.ShowWindow(new LameViewModel(), null, settings);
}
}
나는 문서에서이 작업에 대한 자세한 정보가 있었다 좋겠지 만, 거기 당신은 그것이있다.
당신이보기에 특정 크기를 설정하면 나는이 작업을 볼 수있는 유일한 방법은, 보기가로드 된 후 크기를 auto로 설정하여보기를 해제하십시오. 이때 창의 크기가 내용에 맞는 크기인지 확인하십시오. – Charleh