단추의 명령을 작업에 바인딩 한 후 진행 이벤트를 노출하는 개체를 호출합니다.선언적 진행률 표시 줄 바인딩
event System.EventHandler<ProgressChangedEventArgs> ProgressChanged
나는 최선의 방법으로 내 XAML에 그것을 표시하고 싶습니다. 난 그냥 속성을 업데이트 할 작업을 수행하기 위해 호출하고 어디
한 가지 방법은
member x.Iteration with get() = _iteration
and set(v:int) = _iteration <- v
x.NotifyPropertyChanged <@[email protected]>
member x.IterationVisible with get() = _iterationVisible
and set(v:bool) = _iterationVisible <- v
x.NotifyPropertyChanged <@[email protected]>
다음 내 VM에서 두 바인딩 필드를 노출 할 수 있습니다
member x.CompleteInference(algorithm:IGeneratedAlgorithm) =
x.IterationVisible <- true
algorithm.ProgressChanged.Add(fun args -> x.Iteration <- args.Iteration)
algorithm.run()
x.IterationVisible <- false
그러면 두 가지 질문이 생깁니다 :
012 WPF에 의해 처리 될 수중간체 Iteration
속성 거치지 않고 progressChanged
이벤트를 노출 F 번호에 직접적인 방법 있는가 3,? 그것은 우리가 얻을 수있는 가장 선언적인 것입니까/우리는 항상 어떤 상태를 어딘가에 저장해야합니까?
이 상태 시스템 바인딩을 수행하는 자연스러운 방법이 있습니까? XAML?