# GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.ApplyRecommendedValueCommand

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ApplyRecommendedValueCommand_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.ApplyRecommendedValueCommand*">ApplyRecommendedValueCommand Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ApplyRecommendedValueCommand_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.ApplyRecommendedValueCommand*"></a>
<h4 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ApplyRecommendedValueCommand" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.ApplyRecommendedValueCommand">ApplyRecommendedValueCommand</h4>
<div class="markdown level1 summary"><p>Represents the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.ApplyRecommendedValueCommand.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ApplyRecommendedValueCommand">ApplyRecommendedValueCommand</a> command, which requests that recommended value be applied.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static RoutedUICommand ApplyRecommendedValueCommand { get; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared ReadOnly Property ApplyRecommendedValueCommand As RoutedUICommand</code></pre>
</div>
<h5 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ApplyRecommendedValueCommand_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>
      When recommended value is "2007/11/12 13:14:15", if <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.ShowRecommendedValue.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ShowRecommendedValue">ShowRecommendedValue</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>, this command makes <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.html">GcDateTime</a> apply the value.        
      The default key gesture for this command is <b>Ctrl+Enter</b>.
      </p>
<p>
      If <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.FieldSet.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_FieldSet">FieldSet</a> doesn't contain any field, the recommended value will not be shown 
      and the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.ApplyRecommendedValueCommand.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ApplyRecommendedValueCommand">ApplyRecommendedValueCommand</a> execution will do nothing either.
      </p>
<p>
      Recommended value has lower priority than display fields and watermark.
      When watermark or display fields is shown, the recommended value is not shown any more, but the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcDateTime.ApplyRecommendedValueCommand.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ApplyRecommendedValueCommand">ApplyRecommendedValueCommand</a> still works in this case.
      </p>
</div>
<h5 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_GcDateTime_ApplyRecommendedValueCommand_examples">Examples</h5>
<p>
        The following example shows how to hook up a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.routedcommand">RoutedCommand</a> to an InputMan Control.
      </p>
<p>
        InputMan provides a library of commands which application programmers encounter regularly. 
        The classes which comprise the command library are: <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.FieldsEditingCommands.html">FieldsEditingCommands</a>, 
        <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.CalendarCommands.html">CalendarCommands</a> and <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.ControlNavigationCommands.html">ControlNavigationCommands</a>. 
        And some commands are defined in some classes of controls.
      </p>
<p>
        Many controls in InputMan do have built in support for some of the commands in the command library. 
        <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcTextBox.html">GcTextBox</a>, for example, supports many of the application edit commands such as 
        <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.applicationcommands.paste">Paste</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.applicationcommands.copy">Copy</a>, 
        <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.applicationcommands.cut">Cut</a> and <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.applicationcommands.undo">Undo</a>. 
        The application developer does not have to do anything special to get these commands to work with these controls. 
        If the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcTextBox.html">GcTextBox</a> is the command target when the command is executed, 
        it will handle the command using the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.commandbinding">CommandBinding</a> that is built into the control. 
      </p>
<p>
        The following shows how to use <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.keybinding">KeyBinding</a> as the command source for the command defined on 
        <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcNumber.html">GcNumber</a>, where a <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcNumber.html">GcNumber</a> is the target of the command. 
        All the logic that defines how the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcNumber.html">GcNumber</a> performs the operations is built into the 
        <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.GcNumber.html">GcNumber</a> control. 
      </p>

</div>
