vbrunner__ wrote:Answer: hook up the Enter event for the UserControl and give it the following code:private void UserControl1_Enter( object sender, EventArgs e ) {
this.ActiveControl = textBox1;
}
Discussions
-
-
Massif wrote:Is there a better way?
You might want to take a look at powerGUI or powershell plus. Haven't reasearched them yet but they were in my bookmarks for powershell.
http://powergui.org/faq.jspa
http://blogs.msdn.com/buckwoody/archive/2007/08/16/powershell-plus-very-nice.aspx
-
Rossj wrote: I got my menus hooked up to my concrete Document sub-classes via an AppController with virtually NO CODE.... )
I think it would be great if you gave more detail. -
Rossj wrote:
Haven't used MediaPlayer and VideoDrawing, but do you not need to add the VideoDrawing to something, or tell it where to paint?
Rossj is on the right track, this question was asked in the forums.
It ain't easy, basicly you need a rectangle in your xaml, and then refer to that rectangle in code. Notice the Click on the button is set to the Name of the playMedia event.
XAML:
<StackPanel>
<Rectangle x:Name="VideoRect" Height="220"
RadiusX="10" RadiusY="10"/>
<Button Click="playMedia" VerticalAlignment="Bottom"
Content="Play" Height="25"/>
</StackPanel> Code:
public void playMedia(object sender, RoutedEventArgs e) {
MediaPlayer player = new MediaPlayer();
player.Open( new Uri( @"Movie.wmv", UriKind.Relative ) );VideoDrawing aVideoDrawing = new VideoDrawing();
aVideoDrawing.Player = player;
aVideoDrawing.Rect = new Rect( 0, 0, 222, 222 );
// Needs a Rect associated With the VideoDrawing but size is
// Determinted by the xaml Code.
DrawingBrush dBrush = new DrawingBrush( aVideoDrawing );
VideoRect.Fill = dBrush;// Play the video once.
player.Play();
} -
Coding4Fun Sample: Building a WPF Sudoku Game: Part 1 – Introduction to WPF and XAML
Dec 11, 2006 at 7:47 AMIt says you updated the article for RTM version of the Windows SDK. But the xaml code shows a <LinearGradientBrush.GradientStops>, but it looks like you can't use that anymore. If someone had problems with this like me, I thought you would like to know that you can get rid of that and the corrosponding closing tag.
JohnV -
Stacyw said:
"If you don't have fx3.0,you can download and use the standalone viewer:
http://www.microsoft.com/whdc/xps/viewxps.mspx "
I have .net 3.0 installed and xps files were comming up slower then mollases in January at the north pole (Boy that's pretty slow). I went ahead and installed the viewer and now they come up as quick as a wink. Thanks!!! -
That episode was really cool....
I knew that if peter was near the cheerleader,
that he really wouldn't be dead. -
Married 16 years. But were seperated for about a year and a half. But now with the kids out on there own and us back together a couple of years now. Things are better now then ever before.
Update: The kids were my step children, and knew her and the kids since they were small. There are grown up now. -
Male
1. Hair
2. Body
When do we get to hear the channel 9 guys response?
And while your at it ask him:
Is that even hair? -
Coding4Fun Sample: Extending the Screen Saver Starter Kit with Microsoft Visual Basic.NET
Nov 06, 2006 at 5:07 AMIf I may ask, "What article"?
