by Agnaldo
5. junho 2010 18:18
<Window x:Class="_001_HelloWorld.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<Label Height="28" Name="label1" Margin="20"
VerticalAlignment="Top" HorizontalAlignment="Center">
Hello World!!!
</Label>
<Button Height="23" Name="button1" VerticalAlignment="Center"
HorizontalAlignment="Center" Width="75"
Click="button1_Click">Clique aqui</Button>
</Grid>
</Window>
using System.Windows;
using System.Windows.Media;
namespace _001_HelloWorld
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
/*
* Rendering Tier 0.
The video card will not provide any hardware acceleration.
This corresponds to a DirectX version level of less than 7.0.
* Rendering Tier 1.
The video card can provide partial hardware acceleration.
This corresponds to a DirectX version >= 7.0 and < 9.0.
* Rendering Tier 2.
All features that can be hardware accelerated will be.
This corresponds to a DirectX version >= 9.0.
*/
MessageBox.Show((RenderCapability.Tier >> 16).ToString());
}
}
}