小编Sir*_*Nik的帖子

用于ControlTemplate的ResourceDictionary中的WPF事件

我目前正在尝试实现Metro风格的窗口.
所以我在ResourceDictionary中创建了以下样式:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<!-- Brushes -->
<SolidColorBrush x:Key="BackgroundColor" Color="#FFFFFFFF" />

<!-- Buttons -->
<Style x:Key="MetroControlBoxButton" TargetType="Button">
    <Setter Property="Background" Value="{StaticResource BackgroundColor}" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="Button">
                <ContentPresenter />
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

<!-- Windows -->
<Style x:Key="MetroWindow" TargetType="Window">
    <Setter Property="UseLayoutRounding" Value="True" />
    <Setter Property="WindowStyle" Value="None" />
    <Setter Property="ResizeMode" Value="NoResize" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="Window">
                <Grid Background="{StaticResource BackgroundColor}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="6" />
                        <RowDefinition Height="24" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="24" />
                        <RowDefinition Height="6" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="6" …
Run Code Online (Sandbox Code Playgroud)

wpf events xaml command resourcedictionary

25
推荐指数
1
解决办法
1万
查看次数

C#从视频文件的一部分中提取帧

使用AForge ffmpeg包装器,您可以使用VideoFileReader类从视频中提取帧并将其另存为位图.

请参阅此示例: 提取.avi文件的帧

我的问题是你无法指定从何处开始阅读框架.它始终从视频文件的开头开始.

但是,如果我想提取两个小时长的视频文件中的帧,该怎么办?使用该类,您必须解析整个第一个小时的juste以获得这些帧.

有谁知道实现这一目标的方法?

c# video ffmpeg video-processing

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1

command ×1

events ×1

ffmpeg ×1

resourcedictionary ×1

video ×1

video-processing ×1

wpf ×1

xaml ×1