void IDeviceSpecificDesigner.SetDeviceSpecific(String deviceSpecificParentID, DeviceSpecific ds)
        {
            Debug.Assert(_defaultDeviceSpecificIdentifier == deviceSpecificParentID);

            if (_mobileControl != null)
            {
                if (null != ds)
                {
                    ds.SetOwner(_mobileControl);
                }
                _mobileControl.DeviceSpecific = ds;
            }
            else if (_control != null && ds == null)
            {
                Debug.Assert(_control is DeviceSpecific);

                // Clear the choices if it is a DeviceSpecific control.
                ((DeviceSpecific)_control).Choices.Clear();
            }

            if (null != CurrentChoice)
            {
                if (null == ds)
                {
                    CurrentChoice = null;
                }
                else
                {
                    // This makes sure that the CurrentChoice value is set to null if
                    // it was deleted during the deviceSpecific object editing
                    if (CurrentChoice.Filter.Length == 0)
                    {
                        TemplateDeviceFilter = SR.GetString(SR.DeviceFilter_DefaultChoice);
                    }
                    else
                    {
                        TemplateDeviceFilter = DesignerUtility.ChoiceToUniqueIdentifier(CurrentChoice);
                    }
                }
            }
        }
 void IDeviceSpecificDesigner.SetDeviceSpecific(String deviceSpecificParentID, DeviceSpecific ds)
 {
     Debug.Assert(_defaultDeviceSpecificIdentifier == deviceSpecificParentID);
     if (null != ds)
     {
         ds.SetOwner((MobileControl) _mobileControl);
     }
     _mobileControl.DeviceSpecific = ds;
 }
        void IDeviceSpecificDesigner.SetDeviceSpecific(String deviceSpecificParentID, DeviceSpecific ds)
        {
            Style style = (Style) _styleSheet[deviceSpecificParentID];
            Debug.Assert(null != style, "style is null in IDeviceSpecificDesigner.SetDeviceSpecific");
            if (null != ds)
            {
                ds.SetOwner((MobileControl) _styleSheet);
            }
            style.DeviceSpecific = ds;

            if (CurrentChoice != null && 0 == String.Compare(CurrentStyle.Name, deviceSpecificParentID, StringComparison.OrdinalIgnoreCase))
            {
                if (ds == null)
                {
                    CurrentChoice = null;
                }
                else
                {
                    // This makes sure that the CurrentChoice value is set to null is
                    // it was deleted during the deviceSpecific object editing
                    if (CurrentChoice.Filter.Length == 0)
                    {
                        TemplateDeviceFilter = SR.GetString(SR.DeviceFilter_DefaultChoice);
                    }
                    else
                    {
                        TemplateDeviceFilter = DesignerUtility.ChoiceToUniqueIdentifier(CurrentChoice);
                    }
                }
            }
        }