Categories > Coding > C# >
[help] I Just Started Wpf And I Wanna Know How Do I Do Animations And The Cool Icons And Script Hubs
Posted
Hello I Am New To Wpf This Is The First Thing I Did But If You Can Help Me I Would Give Credits But This Is My First Wpf Here
Added
the gif thing made it look bad
Cancel
Post
I wanna Be A Good Wpf Maker One Day
Replied
Hi there!
For the icons just download this font: https://mega.nz/file/tBBRGD4T#Js3enBUW3TiXh5w4rXcu3WoOU7ubDQfoWeag7cJE-FY
Use the XAML editor to change font family to "segoe fluent icons" and in content paste in the "font code" ( I don't really know how it is called ).
You can get the differnet "font codes" from these two sites:
http://modernicons.io/segoe-mdl2/cheatsheet/
https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-ui-symbol-font
Animation:
1.For example, Add a rectangle and name it something.
<Rectangle x:Name="myRectangle" Fill="Blue" Width="50" Height="50" />
2.Create a new storyboard animation. In this example we will animate the triangle to move from left to right.
<Window.Resources>
<Storyboard x:Key="myStoryboard">
<DoubleAnimation From="0" To="200" Duration="0:0:2" Storyboard.TargetName="myRectangle" Storyboard.TargetProperty="(Canvas.Left)"/>
</Storyboard>
</Window.Resources>
3. Add a button to the mainWindow and give it a name:
<Button x:Name="myButton" Content="Animate" Click="myButton_Click" />
4. In the Code-Behind file for mainWindow, create an event handler for the button click event, that starts the storyboard.
private void myButton_Click(object sender, RoutedEventArgs e)
{
Storyboard myStoryboard = (Storyboard)FindResource("myStoryboard");
myStoryboard.Begin();
}
I hope this helped you :D
Cancel
Post
Replied
@Nikkk, I, too am learning WPF, Thanks for your help could you mention on how to use the icons?
Cancel
Post
https://media.discordapp.net/attachments/1134643100715855893/1138795549244539011/SiggyOnGod.png
Replied
i have some tips for designing a ui here - https://forum.wearedevs.net/t/31358
if you want to learn wpf read this documentation - <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/" target="_blank" rel="" noreferrer="" nofollow"="" style="margin: 0px; border: 0px; box-sizing: border-box; font-family: poppins, Poppins, Arial, sans-serif; color: rgb(52, 152, 219); text-decoration-line: none; background-color: rgb(35, 37, 39);" data-mce-selected="inline-boundary">https://learn.microsoft.com/en-us/dotnet/desktop/wpf/
Cancel
Post
Languages - C++, C#,Javascript, HTML, CSS, Lua ,Xaml, Python
https://plutora.xyz/discord
Replied
please dont become immune lackey v2
Cancel
Post
Replied
@Nikkk, Thanks I Got Better
Cancel
Post
Added
I Did Get A Little Better But Join My Server I Was Thinking Like A Code Server We Can Help Each Other And Update On My Executor https://cdn.discordapp.com/attachments/1076824580905242636/1076825889020592208/image.png
Cancel
Post
I wanna Be A Good Wpf Maker One Day
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post