سؤال

أنا أستخدم Cinch Framework V1. لقد كشفت عن خاصية عامة (التياروبيير) وضربت تلك الخاصية إلى مربع التحرير والسرد الخاص بي .. بعد تحديث الشاشة ، لا يتغير شاشة Combobox إلى القيمة الحالية للمورد .. فيما يلي بعض قصاصات الرمز ..

/// <summary>
    /// Current Supplier Record
    /// </summary>
    static PropertyChangedEventArgs currentsupplierChangeArgs =
        ObservableHelper.CreateArgs<IncomingViewModel>(x => x.CurrentSupplier);

    public SupplierModel  CurrentSupplier
    {
        get { return currentsupplier ; }
        set
        {
            currentsupplier = value;

            NotifyPropertyChanged(currentsupplierChangeArgs);

        }
    }

رمز XAML:

  <ComboBox Margin="345,8,542,0" Name="cbosupplier" Height="23" VerticalAlignment="Top" 
          VerticalContentAlignment="Center"
          ItemTemplate="{StaticResource SupplierTemplate}" 
          ItemsSource="{Binding Path=ListofSupplier}"     
          Grid.ColumnSpan="3" Grid.RowSpan="2"
          SelectedItem="{Binding Path=CurrentSupplier ,Mode = TwoWay}"  

لقد حاولت ربط التيار في مربع نص فقط لمعرفة ما إذا كان BINDS يعمل .. وهو يعمل .. يتم تحديث مربع النص بالقيمة الحالية لخاصية التيار الخاص بي .. لكنها لن تعمل على combobox ..

لا يوجد حل صحيح

نصائح أخرى

هناك فرق بين SelectionItem و SelectSvalue.

هل حاولت استخدام SelectValue بدلاً من ذلك؟

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top