コード例 #1
0
 private void addAddressForm()
 {
     dgAddresses.SelectedIndex = -1;
     resetAddressForm(true);
     AFDone.SetResourceReference(ContentControl.ContentProperty, "bAdd");
     AFDone.SetResourceReference(ContentControl.ToolTipProperty, "bAdd");
     AFDelete.SetResourceReference(ContentControl.ContentProperty, "bCancel");
     AFDelete.SetResourceReference(ContentControl.ToolTipProperty, "bCancel");
     AFDelete.SetResourceReference(ContentControl.StyleProperty, "MaterialDesignRaisedButton");
 }
コード例 #2
0
        /// <summary>
        /// Fill address info befor edit
        /// </summary>
        /// <param name="address"></param>
        private void editAddressForm(Address address)
        {
            AFWay.Text        = address.Way;
            AFComplement.Text = address.Complement;
            AFZipCode.Text    = address.ZipCode;
            AFCity.Text       = address.City;

            AFDone.SetResourceReference(ContentControl.ContentProperty, "bDone");
            AFDone.SetResourceReference(ContentControl.ToolTipProperty, "bDone");
            AFDelete.SetResourceReference(ContentControl.ContentProperty, "bDelete");
            AFDelete.SetResourceReference(ContentControl.ToolTipProperty, "bDelete");
            AFDelete.SetResourceReference(ContentControl.StyleProperty, "MaterialDesignRaisedAccentButton");

            setAddressForm();
        }