0
XAML의 Image 속성과 바인딩 할 수있는 이미지가 있습니다. 문제는 뷰를 팝업 할 때 보이지 않는 상태로 유지하고 싶을 때입니다. 내 버튼을 클릭하면 지금까지 다시 나타납니다. ViewModel :MVVM Xamarin Forms를 사용하여 이미지 가시성을 처리하는 방법
private string imageSource; 내 BindingContext
재산에서 IsVisible에서
public string ImageSource
{
get { return imageSource; }
set { imageSource = value; Notify("ImageSource"); }
}
public bool State { get { return false; }}
private Image visibleImage;
public Image VisibleImage
{
get { return new Image {IsVisible = State,Source = ImageSource }; }
set { visibleImage = value; Notify("VisibleImage"); Notify("State"); }
}
false로 설정되어 있지만 작동하지 않습니다!
감사합니다. 작동합니다! –