<DataGridTextColumn.CellStyle>
<Style>
<Setter Property="FrameworkElement.HorizontalAlignment" Value="Right" />
</Style>
</DataGridTextColumn.CellStyle>
14 years ago
One step forward, two steps back
<DataGridTextColumn.CellStyle>
<Style>
<Setter Property="FrameworkElement.HorizontalAlignment" Value="Right" />
</Style>
</DataGridTextColumn.CellStyle>
$("#datepicker").datepicker(
{
// The CallBack argument is an anonymous function
onSelect: function(dateText, inst)
{
// This invokes the real function
myCallBackFunction(dateText, inst);
}
}
);
// This is the real function that will
// be executed when the onSelect
// invokes its Callback
function myCallBackFunction(dateText,inst)
{
$("#selectedDate").val(dateText);
}
$("#datepicker").datepicker(
{
// The CallBack argument is an anonymous function
onSelect: function(dateText, inst)
{
$("#selectedDate").val(dateText);
}
}
);
| IDL Type | .NET Type |
| char | System.SByte |
| short | System.Int16 |
| int, long, HRESULT and SCODE | System.Int32 |
| int64 | System.Int64 |
| unsigned char | System.Byte |
| unsigned short | System.UInt16 |
| unsigned int and unsigned long | System.UInt32 |
| uint64 | System.UInt64 |
| float | System.Single |
| double | System.Double |
| BSTR, LPSTR and LPWSTR | System.String |
| VARIANT_BOOL | System.Boolean |
| DATE | System.DateTime |
| GUID | System.Guid |
| DECIMAL | System.Decimal |
| CURRENCY | System.Decimal |
| VARIANT | System.Object |
| IUnknown* | System.Object |
| IDispatch* | System.Object |
| void* | System.IntPtr |
| IDispatchEx* | System.Runtime.InteropServices.Expando.IExpando |
| IEnumVariant* | System.Collections.IEnumerator |
| COM | IDL |
| boolean and small | char |
| wchar_t | unsigned short |
| hyper and __int64 | int64 |
| [string] char* | LPSTR |
| [string] wchar_t* | LPWSTR |
| byte | unsigned char |
| unsigned hyper and unsigned __int64 | uint64 |
<Window.Resources>
<Style TargetType="TextBlock">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Pink" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<StackPanel>
<TextBlock>Hello World</TextBlock>
</StackPanel>
private void TextBox_KeyDown(object sender, KeyEventArgs e)
{
if ((e.Key == Key.Enter) || (e.Key == Key.Return))
{
TextBox FocusedControl = Keyboard.FocusedElement as TextBox;
if (FocusedControl != null)
{
TraversalRequest Traversal = new TraversalRequest(FocusNavigationDirection.Down);
FocusedControl.MoveFocus(Traversal);
}
}
}
Nice and simple in the end --- it turns out that the TraversalRequest and FocusNavigationDirection classes/enums are very simple and powerful & not limited to DataGrids at all.
...
xmlns:local="clr-namespace:Sandstorm.PointOfSale.Modules.Tender.Resources"
...
<TextBlock Padding="20,0,0,0" Text="{Binding Source={x:Static local:ResourceStrings.V_Discount}, Mode=OneTime}" FontStyle="Italic"/>