[英]Unable to use FlexLayout in a BindableLayout with MAUI
我正在嘗試在帶有 MAUI 的 BindableLayout 的 DataTemplate 部分中使用 FlexLayout。 我將 StackLayout 用作 BindableLayout。 但是,由於似乎來自 Xaml 代碼的錯誤,該應用甚至無法啟動。 當我改用 StackLayout 或 ...
[英]Unable to use FlexLayout in a BindableLayout with MAUI
我正在嘗試在帶有 MAUI 的 BindableLayout 的 DataTemplate 部分中使用 FlexLayout。 我將 StackLayout 用作 BindableLayout。 但是,由於似乎來自 Xaml 代碼的錯誤,該應用甚至無法啟動。 當我改用 StackLayout 或 ...
[英]How to make a bindable markup extension in Xamarin.Forms
眾所周知,沒有內置的類型轉換器 class 可以將字符串轉換為 ImageSource object。 當我想讓我的模型有一個字符串屬性表示嵌入圖像的 ResouceID,然后 XAML 的 Image.Source 屬性通過數據綁定綁定到該屬性時,這給我帶來了挑戰。 最簡單的解決方案是在 mode ...
[英]Xamarin Forms - Using bindable layout to access different parts of the model
我正在嘗試設置一個圖像庫,該庫還具有使用 MVVM 進程單擊圖像以顯示/隱藏帶有圖像描述的網格的功能。 但是,我認為我的 model,查看 model 和視圖設置不正確,因為如果我在頂部堆棧布局中使用BindableLayout.ItemsSource="{Binding GalleryList.G ...
[英]Xamarin Forms: How to get the BindableProperty by the property name?
您好,我需要通過屬性名稱獲取 BindableProperty。 但我不想使用這種“if else”風格。 有沒有一種不需要判斷類型和名稱的通用方法? ...
[英]Bindable property value pass from Child view's bindable property inside parent Page using Xamarin Forms?
我創建了一個具有Image的View(BlankScreen),並在該視圖的后面代碼中創建了BindableProperty圖標。 View的Xaml代碼: 查看后面的代碼: 然后,我將此視圖用於Page,因此我將此視圖包括在BindableProperty Icon中。 ...
[英]How to use a Grid with Bindable Layout (more than one column)
在 Xamarin.Forms 3.5 中,Microsoft 向我們介紹了可綁定布局,可用於動態填充布局(例如StackLayout 、 Grid等)。 在具有單列的網格中使用它非常簡單: <Grid BindableLayout.ItemsSource="{Binding Items}" ...
[英]Passing filtered @Bindable objects to multiple views in SwiftUI
我正在嘗試將過濾器數組傳遞給多個視圖,但是過濾不起作用。 如果刪除篩選器,則可以將數組傳遞到下一個視圖,但這會在ForEach循環期間導致另一個錯誤。 我已經在下面發布了所有代碼。 有誰知道如何傳遞@Bindable數組的過濾器版本? 另外,為什么我不能在ForEach循環中打印sp ...
[英]Can I disable a Button in my Xamarin ContentView custom control using a BindableProperty?
我希望能夠在Xamarin.Forms應用程序中的自定義標題ContentView中禁用按鈕,以便在從包含它的ContentPage移開之前,可以警告用戶他們有未保存的數據。 我為HeaderView創建了BindableProperty,其中我的包含頁面綁定了它的視圖模型。 我受到了本 ...
[英]RasiePropertyChanged is not working, If BindableBase is indirectly inherited. OneWay mode
我的viewmodel是間接繼承自BindableBase類,當我在viewmodel中更改屬性時,它不會更新UI。 當我直接從BindableBase類繼承它時,它會更新UI。 這是“OneWay”模式的情況。 如果我使用“TwoWay”模式,它在兩種情況下都能正常工作。 任何人都可以 ...
[英]BindableProperty for Image Source in contentview
我試圖將DogImage源綁定到我的Contentview中。 我試圖建立可重用的視圖對象,如框架按鈕。 我只需要從contentview之外給它們提供圖像和文本。 我正在使用資源文件夾中的圖像。 這是我的contentView 這是CS文件 這就是我要使用它的方式。 ...
[英]Xamarin binding property of base view
我有一個基本的XAML視圖,該視圖具有一個具有可綁定屬性的自定義控件,該控件用於顯示/隱藏Grid控件。 我需要從繼承自基本View的XAML View中更改此屬性。 自定義控件視圖 它的看法 基類 基本視圖 然后,我有一個從基本View繼承的視圖,其中有 ...
[英]Aurelia make bindable act as observable on object properties
在Aurelia綁定中,如果在組件中我們在屬性上使用可觀察的裝飾,並且如果屬性是對象,那么我們將訂閱該對象的所有屬性。 例如: 因此,如果其中一個顏色屬性發生變化,那么它將觸發colorChanged。 但在自定義元素中,我們有這樣的可綁定: 然后不會在其屬性更改時調用d ...
[英]Bindable not getting notified
上面的代碼是我從Google的示例代碼中提取的-https: //developer.android.com/reference/android/databinding/Bindable 並在XML中使用它,例如 每當我調用myViewModel.setFirstName("Mo ...
[英]Python bindable entities?
我看到在John Wiley的《 Programming Language Design Concepts》(2004年)一書中,有一個可綁定對象的定義: “可綁定實體是可以綁定到標識符的實體。編程語言在可綁定實體的種類中有所不同: •C的可綁定實體是類型,變量和函數過程。 • ...
[英]Xamarin custom BindableProperty with Converter
我有一個帶有自定義BindableProperty的自定義視圖: 在我的XAML中,由於Valore的值是可為null的Int ,所以我必須使用這樣的轉換器: 如何在XAML端不使用Converter={StaticResource NullableConverter ,而直接在 ...
[英]How do I put a dictionary key pair into a picker in xamarin forms and retrieve the key value from the picker?
我有一個xaml文件,我把選擇器和后面的代碼填入其中。 使用的代碼如下: 當我選擇黃色時,我試圖獲得值55,但我得到的唯一的東西是5.我使用它來獲取所選值 甚至可以獲得關鍵值? 已經查看了BindablePicker,但似乎根本沒有用。 非常感謝任何幫助。 ...
[英]How to pass route param as bindable value to component's viewmodel (not view)
我使用了路線導航,可以從激活位置訪問路線參數。 app.ts } student.ts 它路由到的頁面是使用幾個需要傳遞此參數的組件構建的。 在我的成績視圖中,當我在html元素中顯示它時,它可以正確獲取id(在viewmodel中將其設為可綁定后): ...
[英]Aurelia: How to observe a specific property of a bound object (custom attribute)
我正在嘗試觀察綁定到自定義屬性的對象特定屬性的更改事件。 我為此使用bindable標簽。 物體 元素 屬性 上面的示例僅觸發更改處理程序一次。 但是,當info對象上的屬性之一發生更改時,我需要每次觸發它。 在我的用例中,哪個屬性更改無關緊要,我只需要知道什 ...
[英]Update the target from the source with bindable base WPF
這是viewmodel中的可綁定屬性 a 在視圖模型中更改此工具提示時,視圖不會更新。 如何將視圖從源更新為目標? ...
[英]Xamarin.Forms SetBinding to Image so that it refreshes when its Source changes
當我改變他們的ImageSource時,我試圖在我的頁面中更新/重新繪制圖像 - 這將幫助我重新加載異步。 我認為綁定到圖像的imageSource有一個可綁定屬性是一個開始,但它沒有更新圖像。 我嘗試了很多方法,包括一個帶有OnPropertyChanged事件的viewModel方法 ...