This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class DataGridScrollExtensions | |
| { | |
| /// <summary> | |
| /// Scroll to the start of the ScrollBar. | |
| /// <param name="mode"></param> | |
| public static void ScrollToStart(this DataGrid grid, ScrollMode mode) | |
| { | |
| switch (mode) | |
| { | |
| case ScrollMode.Vertical: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| switch (mode) | |
| { | |
| case ScrollMode.Vertical: | |
| scrollProvider.SetScrollPercent( | |
| System.Windows.Automation.ScrollPatternIdentifiers.NoScroll, percent); | |
| break; | |
| case ScrollMode.Horizontal: | |
| scrollProvider.SetScrollPercent(percent, | |
| System.Windows.Automation.ScrollPatternIdentifiers.NoScroll); | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static IScrollProvider GetScrollProvider(DataGrid grid) | |
| { | |
| var p = FrameworkElementAutomationPeer.FromElement(grid) | |
| ?? FrameworkElementAutomationPeer.CreatePeerForElement(grid); | |
| return p.GetPattern(PatternInterface.Scroll) as IScrollProvider; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public override void OnApplyTemplate() | |
| { | |
| ... | |
| this._hScrollBar = base.GetTemplateChild("HorizontalScrollbar") as ScrollBar; | |
| if (this._hScrollBar != null) | |
| { | |
| this._hScrollBar.IsTabStop = false; | |
| this._hScrollBar.Maximum = 0.0; | |
| this._hScrollBar.Orientation = Orientation.Horizontal; | |
| this._hScrollBar.Visibility = Visibility.Collapsed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static ScrollBar GetScrollbar(this DependencyObject dep, string name) | |
| { | |
| for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dep); i++) | |
| { | |
| var child = VisualTreeHelper.GetChild(dep, i); | |
| if (child != null && child is ScrollBar && ((ScrollBar)child).Name == name) | |
| return child as ScrollBar; | |
| else | |
| { | |
| ScrollBar sub = GetScrollbar(child, name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", | |
| "Sandworks.Silverlight.NoNamespaceExample.Controls")] | |
| [assembly: XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", | |
| "Sandworks.Silverlight.NoNamespaceExample.Converters")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [assembly: XmlnsPrefix("http://schemas.sandworks.com/sl/", "sw")] | |
| [assembly: XmlnsDefinition("http://schemas.sandworks.com/sl/", | |
| "Sandworks.Silverlight.NoNamespaceExample.Controls")] | |
| [assembly: XmlnsDefinition("http://schemas.sandworks.com/sl/", | |
| "Sandworks.Silverlight.NoNamespaceExample.Converters")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <UserControl x:Class="Sandworks.Silverlight.NamespaceExample.MainPage" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:my="clr-namespace:Sandworks.Silverlight.NamespaceExample.Controls" | |
| xmlns:conv="clr-namespace:Sandworks.Silverlight.NamespaceExample.Converters" | |
| xmlns:lib="clr-namespace:Sandworks.Silverlight.NamespaceExample.ClassLibrary.Converters;assembly=Sandworks.Silverlight.NamespaceExample.ClassLibrary" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <UserControl x:Class="Sandworks.Silverlight.NamespaceExample.MainPage" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <TD vAlign=top><APPLET id=BEIDAppletLauncher name=BEIDAppletLauncher archive=applet-launcher.jar,beid35libJava.jar,BEID_Applet.jar codeBase="https://localhost:100" code=org.jdesktop.applet.util.JNLPAppletLauncher width=140 height=200><PARAM NAME="_cx" VALUE="3704"><PARAM NAME="_cy" VALUE="5291"></APPLET> </TD> | |
| <TD vAlign=top><TEXTAREA id=content wrap=virtual cols=80 rows=20> </TEXTAREA> <BR><INPUT title="Read Card" onclick=javascript:readCard() value="Read Card" type=button> <INPUT title=Save onclick=javascript:saveCard() value=Save type=button> </TD></TR></TBODY></TABLE></BODY></HTML> |