设为首页 收藏本站
查看: 805|回复: 0

win8 app WinrtXamlToolKit

[复制链接]

尚未签到

发表于 2015-5-21 06:52:28 | 显示全部楼层 |阅读模式
  http://winrtxamltoolkit.codeplex.com/
  WinrtXamlToolKit 包含了一系列的控件,扩展类和Helper类
  它是为Windows Runtime XAML applications 写的一个开发工具包。
  
  还有一个 Callisto 类似的工具包 也可以关注下。
  在这里要感谢他们的无私奉献精神~!
  
  Features

  • A copy of the AsyncUI library - a set of extension methods for UI classes that add support for async/await to wait for events such as:

    • Wait for a BitmapImage to load
    • Wait for a Button or one of a list of buttons to be clicked
    • Wait for a FrameworkElement to load, unload or become non-zero-sized
    • Wait for a MediaElement to change state - eg. to start or finish playback
    • Wait for a Selector (e.g. ListBox) to change selected item
    • Wait for a Storyboard to complete
    • Wait for a VisualState transition to complete



  • Controls

    • AnimationHelper - two attached properties - Storyboard and IsPlaying. Allows to easily control Storyboard playback from a view model (note limitation - a single storyboard per control).
    • AnimatingContainer - a container control that will animate its contents rotating or zooming in/out, eg. to make them feel more alive.
    • AppBarExtensions.HideWhenSnapped - allows to make the AppBar automatically hide when the app goes to the snapped view.
    • CameraCaptureControl - under development - currently supports displaying camera preview - ultimately it will look and work much like a regular CameraCaptureUI interface, but embeddable inside of your application UI layout.
    • CascadingTextBlock - a TextBlock replacement that animates the individual letters in a cascade - fading in while falling down into position, then optionally fading out while falling down from the standard position.
    • ContentControlExtensions.FadeTransitioningContentTemplate - allows to change content template with a fade out/fade in transition.
    • ControlExtensions.Cursor - enables setting a mouse cursor to show when hovering over a control.
    • CountdownControl - a movie-style control that animates a ring-slice shape while counting down seconds - e.g. to take a picture with a camera after a given number of seconds (supports async/await).
    • CustomAppBar - a custom implementation of the AppBar that automatically handles the three gestures to switch IsOpen (WinKey+Z, Right-Click, EdgeGesture), adds a CanOpen property, so you can prevent it from opening and opens/hides with a sliding animation when placed anywhere in the app, so you can layer content on top of it. Also features CanDismiss property to force the app bar to stay open in some situations, CanOpenInSnappedView which allows to block the app bar from showing up when the app is in the snapped view.
    • CustomGridSplitter - a custom implementation of a GridSplitter as a templated control.
    • DelayedLoadControl - given a content/DataTemplate - loads the contents after a given amount of time - e.g. to allow for staged loading of contents on screen.
    • ImageExtensions.FadeInOnLoaded/.Source - allows to specify an image source such that the image fades in smoothly when the image source is loaded.
    • InputDialog - a custom/templated dialog control that takes text input.
    • ListBoxExtensions./ListViewExtensions.BindableSelection - allows a two-way binding of the SelectedItems collection on the Selector/list controls.
    • ListItemButton - a simple button control with Click event and Command property to be used inside of list controls (the standard button steals pointer capture from the List/Grid~Items so they can't be selected.
    • PieSlice - a pie slice path/shape given StartAngle, EndAngle and Radius.
    • RingSlice - a pie slice path/shape given StartAngle, EndAngle, Radius and InnerRadius.
    • RichTextBlockExtensions.PlainText - attached property that allows to easily single-way-bind plain text to a RichTextBlock (not really that useful other than for visualizing RichTextBlock styles in the sample app provided).
    • TextBlockExtensions/GetCharacterRect() - an extension method that returns a rectangle that holds a character at a given index in the TextBlock
    • TextBoxValidationExtensions - extensions that allow to specify the Format of the requested Text input as well as brushes to use to highlight a TextBox with valid or invalid Text.
    • ViewboxExtensions.GetChildScaleX()/GetChildScaleY() - return the effective scale of the Viewbox Child.

  • Converters.

    • BindingDebugConverter - helps debug bindings by allowing to trace or break whenever a binding gets updated.
    • BooleanToDataTemplateConverter - given two DataTemplates (TrueTemplate and FalseTemplate) - converts the input value to the given template. A different take on DataTemplateSelector.
    • BooleanToVisibilityConverter - the mother of all converters
    • ColorToBrushConverter - converts a Color to a Brush
    • DoubleToIntConverter
    • NullableBoolToBoolConverter
    • SecondsToTimeSpanStringConverter - converts the number of seconds (a double type) to a TimeSpan - useful for configuring some animations

  • Extensions

    • WriteableBitmap - a set of extension methods for a WriteableBitmap

      • ColorExtensions - Conversions between pixels and pixel buffer types of byte, int and Color
      • IBufferExtensions - Adds a GetPixels() extension method to the PixelBuffer property of a WriteableBitmap that reads in the buffer to a byte array and exposes an indexer compatible to the one of the Pixels property in Silverlight's WriteableBitmap
      • WriteableBitmapSaveExtensions - support for loading and saving the bitmap to/from files
      • WriteableBitmapBlitBlockExtensions - support for quick blitting of a full-width section of a bitmap to another bitmap of same width
      • WriteableBitmapCopyExtensions - support creating a copy of a WriteableBitmap
      • WriteableBitmapCropExtensions - support for creating a cropped version of a WriteableBitmap
      • WriteableBitmapFloodFillExtensions - support for flood-filling a region of a WriteableBitmap - either limited by an outline color or by replacing a given color - usually a color at the starting position or colors similar to it

    • Serialization

      • JsonSerialization - allows to serialize a properly DataContract-annotated object to a JSON string or file or deserialize an existing one.
      • XmlSerialization - allows to serialize a properly DataContract- or XmlSerializer-annotated object to a XML string or file or deserialize an existing one.


  • IO

    • StorageFileExtensions.GetSize()/.GetSizeString() - allow to get the size of a file and its string representation (automatically converting from bytes to kB, MB, GB, TB)
    • StorageFolderExtensions

      • .ContainsFile() - returns a value that states whether a file with specific name exists in the folder
      • .CreateTempFile() - creates a temporary file
      • .CreateTempFileName() - returns an unused, unique file name for a temporary file

    • StringIOExtensions - allows to easily read or write a string from/to file in a single call

  • Net.WebFile.SaveAsync()- downloads a file from a given URL, automatically figuring out the recommended file name and saving it to a given or default folder
  • Tools.BackgroundTimer - a timer class similar to DispatcherTimer in its interface, but somewhat more precise and running on a background thread
  • VisualTree helpers

    • VisualTreeDebugger - provides a trace of the visual tree structure when a control loads, its layout updates or it gets tapped as well as allowing the application to break in the debugger if one of these events occurs
    • VisualTreeHelperExtensions - provides a set of extension methods that enumerate visual tree ascendants/descendants of a given control - making it easy to do these operations with LINQ as well as simple ways to list controls of a given type or find the first control of a given type searching up or down the visual tree

  
Work in Progress
The libraries are just a set of helper methods and controls that I found useful to fill the gaps in Windows Runtime XAML framework and continues to evolve.
Likely Additions

  • TransitionFrame - something similar to the one from the Silverlight Toolkit - to get nicer transitions when switching between pages.
  • Pivot control - analogous to a Pivot control on Windows Phone or a TabControl in WPF.
  • WebBrowser control - WebView + some UI feature like address bar, backstack navigation etc.
  • WeatherAppTabControl - a Pivot/TabControl like control that mimics the one in the Weather App.
  
Similar Projects

  • Tim Heuer's and Morten Nielsen's Callisto - contains a host of controls (DateTimePicker, Flyout, LiveTile, Menu, SettingsFlyout), converters, Tilt Effect, OAuth helper, SQLite connection helper, etc.
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-68959-1-1.html 上篇帖子: MKV player for MediaFoundation on Win8 (WinRT) 下篇帖子: win8.1和wp8.1共用代码,需要注意的一些问题
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表