6502bench/CommonWPF/FrameAnimationControl.xaml

38 lines
1.4 KiB
XML

<!--
Copyright 2019 faddenSoft
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Basic usage:
<common:FrameAnimationControl Name="previewAnim" Width="256" Height="256"/>
You must explicitly Stop() the animation, or it will continue to run forever.
Thanks: https://blogs.claritycon.com/wpf-image-sequencer-for-png-sequences-4c826f7d4462
-->
<UserControl x:Class="CommonWPF.FrameAnimationControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CommonWPF"
mc:Ignorable="d"
Background="Transparent"
d:DesignHeight="128" d:DesignWidth="128">
<Grid>
<Image Name="theImage"/>
</Grid>
</UserControl>