本文整理汇总了C#中Compositor.CreateAmbientLight方法的典型用法代码示例。如果您正苦于以下问题:C# Compositor.CreateAmbientLight方法的具体用法?C# Compositor.CreateAmbientLight怎么用?C# Compositor.CreateAmbientLight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Compositor
的用法示例。
在下文中一共展示了Compositor.CreateAmbientLight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ThumbnailLighting
public ThumbnailLighting()
{
Model = new LocalDataSource();
this.InitializeComponent();
// Get the current compositor
_compositor = ElementCompositionPreview.GetElementVisual(this).Compositor;
//
// Create the lights
//
_ambientLight = _compositor.CreateAmbientLight();
_pointLight = _compositor.CreatePointLight();
_distantLight = _compositor.CreateDistantLight();
_spotLight = _compositor.CreateSpotLight();
}
示例2: CompositionList
public CompositionList()
{
this.InitializeComponent();
this.Loaded += CompositionList_Loaded;
this.Unloaded += CompositionList_Unloaded;
// Get the current compositor
_compositor = ElementCompositionPreview.GetElementVisual(this).Compositor;
SurfaceLoader.Initialize(_compositor);
//
// Create the lights
//
_ambientLight = _compositor.CreateAmbientLight();
_pointLight = _compositor.CreatePointLight();
_distantLight = _compositor.CreateDistantLight();
_spotLight = _compositor.CreateSpotLight();
}