2017년 1월 31일 화요일

자마린 스튜디오(Xamarin Studio)에서 변환(Translation) 사용하기

웹에서는 css를 사용해서 변환이나 애니메이션 효과를 줄 수 있습니다. 
iOS에도 다양한 코코아 기반의 변환과 애니메이션 효과를 줄 수 있습니다. 자마린에서는 재물에서 제공하는 선언된 태그를 사용해서 비슷하게 효과를 낼 수 있습니다. 
슬라이더를 변경하면 x축과 y축이 변경되는 것을 볼 수 있다.


<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:DemoTranslation" x:Class="DemoTranslation.DemoTranslationPage">

    <StackLayout Padding="20, 10">
        <Frame x:Name="frame" 
                HorizontalOptions="Center"
                VerticalOptions="CenterAndExpand"
                OutlineColor="Accent">

            <Label Text="TEXT"
                    FontSize="Large" />
        </Frame>

        <Slider x:Name="xSlider"
                Minimum="-200"
                Maximum="200"
                Value="{Binding Source={x:Reference frame}, 
                    Path=TranslationX}" />
         <Label Text="{Binding Source={x:Reference xSlider},
             Path=Value,
             StringFormat='TranslationX = {0:F0}'}"
             HorizontalTextAlignment="Center" />
        <Slider x:Name="ySlider"
            Minimum="-200"
             Maximum="200"
             Value="{Binding Source={x:Reference frame},
             Path=TranslationY }" />
         <Label Text="{Binding Source={x:Reference ySlider},
             Path=Value,
             StringFormat='TranslationY = {0:F0}'}" />
    </StackLayout>
</ContentPage>


댓글 없음:

댓글 쓰기

참고: 블로그의 회원만 댓글을 작성할 수 있습니다.

Xcode 26의 새로운 기능들

 애플의 AI준비에 대한 골든타임이 지나가고 있다는 말이 많이 들립니다. ㅎㅎ  애플의 그동안의 패쇄적인 환경을 생각하면 온디바이스AI나 LLM환경에서 다소 아쉬운 부분이 많이 있습니다. 다른 빅테크들과 전혀 다른 방향의 목소리를 내고 있어서 좀 우려...