Giter Site home page Giter Site logo

borderlabs's Introduction

BorderLabs

Overview

정적인 Border를 동적으로 변경할 수 있는 다양한 시도를 통해 만들어내기 위한 저장소입니다.

Border 상속기반

Nuget.AnimateBorder Nuget.AnimateBorder

1. Animation Loop Mode

image

  • 테두리 색상 원리 BorderBrushs는 값이 업데이트 될 때마다 값에 따라 비율 조절하고 LinearGradation기반으로 만들어냈습니다
  • 구현 방식 지정된 시간에 맞게 StartPoint와 EndPoint를 360도 값을 변경하며 회전하게 됩니다.

SAMPLE CODE

 <units:AnimateBorder
     AnimationType="Loop"
     BorderThickness="10"
     CornerRadius="50"
     Interval="0:0:2">
     <units:AnimateBorder.BorderBrushs>
         <x:Array Type="{x:Type SolidColorBrush}">
             <SolidColorBrush Color="Blue" />
             <SolidColorBrush Color="Red" />
             <SolidColorBrush Color="Lime" />
             <SolidColorBrush Color="Black" />
         </x:Array>
     </units:AnimateBorder.BorderBrushs>
     <Grid>
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="100" />
             <ColumnDefinition Width="auto" />
         </Grid.ColumnDefinitions>
         <Label
             HorizontalAlignment="Center"
             VerticalAlignment="Center"
             Content="Box" />
         <Button
             Grid.Column="1 "
             Width="100"
             Height="50" />
     </Grid>
 </units:AnimateBorder>

동작 영상

WPF MAUI
bandicam.2023-12-19.15-19-35-507.mp4
KakaoTalk_Recording_20231220_154437.mp4

2. Animation FadeInOut Mode

  • 구현 방식 Border 자체를 Opacity로 제어하는 경우에는 그 안에 속한 하위 계층들 또한 Opacity 속성이 들어가기 때문에 Color값으로 지정된 컬러 -> Tranparent로 변경하는 방식으로 구현 SAMPLE CODE
<units:AnimateBorder
    AnimationType="FadeInOut"
    BorderBrush="Blue"
    BorderThickness="5"
    CornerRadius="3"
    Interval="0:0:0.5">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="auto" />
        </Grid.ColumnDefinitions>
        <Label
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Content="Box" />
        <Button
            Grid.Column="1 "
            Width="100"
            Height="50" />
    </Grid>
</units:AnimateBorder>

동작 영상

KakaoTalk_Recording_20231221_164520.mp4

borderlabs's People

Contributors

lukewire129 avatar

Stargazers

Dongmin Jang (장동민) avatar Nilesh Chaudhari avatar jamesnet avatar Trav avatar  avatar dimohy avatar

Watchers

 avatar

Forkers

dogzz9445

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.