Categories > Coding > C# >

[help] I Just Started Wpf And I Wanna Know How Do I Do Animations And The Cool Icons And Script Hubs

Posts: 8

Threads: 2

Joined: Feb, 2023

Reputation: 0

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

  • 1

Added

the gif thing made it look bad

 

  • 0

I wanna Be A Good Wpf Maker One Day

Posts: 329

Threads: 18

Joined: Nov, 2021

Reputation: 41

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

  • 1

Posts: 151

Threads: 7

Joined: Feb, 2023

Reputation: 5

Replied

@Nikkk, I, too am learning WPF, Thanks for your help could you mention on how to use the icons?

  • 0

https://media.discordapp.net/attachments/1134643100715855893/1138795549244539011/SiggyOnGod.png

Posts: 599

Threads: 52

Joined: Oct, 2022

Reputation: 30

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/

  • 1

Languages - C++, C#,Javascript, HTML, CSS, Lua ,Xaml, Python

https://plutora.xyz/discord

Akula

Pv.Akula

vip

Posts: 185

Threads: 14

Joined: Apr, 2018

Reputation: 35

Replied

please dont become immune lackey v2

  • 0

Posts: 8

Threads: 2

Joined: Feb, 2023

Reputation: 0

Replied

@Nikkk, Thanks I Got Better 

  • 0

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

  • 0

I wanna Be A Good Wpf Maker One Day

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )