小编Jes*_*ero的帖子

如何在Windows中使用C#,WPF进行"推送通知"服务?

我有一个用C#编写的WPF浏览器应用程序.其中有一个进程,我需要通知用户其状态.(即在分配任务时通知用户).

客户端不希望通过邮件发送这些通知,他们希望有一个托盘图标,当为其分配"任务"时通知每个用户.但是,这个应用程序将被大量用户使用,并且通过基于轮询服务器进行状态更改来建立通知系统,意味着浪费大量流量,因为他们需要用户接收通知尽可能接近"实时".

但是,我找不到任何直接发送到任何版本的Windows的推送通知的示例.

为了最小化使用的带宽,我想在服务器上有一个事件监听器,并从那里触发通知,因为它只是一个连接轮询服务器以进行更改.

我如何从服务器向每个其他用户发送通知?

c# windows wpf sql-server-2008

6
推荐指数
1
解决办法
3923
查看次数

如何更改 WordPress 中特定页面的 CSS?

我想更改特定页面的 CSS,但无法获取该页面的 ID。我想知道当我没有特定页面的 ID 时如何更改该页面的 CSS?这是我的页面 ID:forum=forum-framtidsjouren

如果我更改下面的代码,我也会更改其他页面......

.home #content, .single #content, .page #content 
{
background: none repeat scroll 0 0 transparent;
box-shadow: none;
width: 100% !important; // I want to change width to 100% !important
}
Run Code Online (Sandbox Code Playgroud)

css wordpress

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

网格和列表框有一些我无法摆脱的边框

我对WPF很新.我只是尝试使用Grid和Listbox进行一些布局,但是我有一些填充/间距/边距/边框(简称为边框),我无法逃脱.

边界围绕四个元素,元素本身没有问题,它们之间没有空间.

还尝试了WPF Inspector,但我无法找到它的来源.没有什么可看的.

这是我的XAML:

<Window x:Class="WpfElements.FourElements"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="FourElements" Height="701" Width="351">
<Grid Background="Red" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
    <Grid.RowDefinitions>
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>

    <ListBox Margin="0" BorderThickness="0" Padding="0" Grid.Row="0" Grid.Column="0" Background="Lime" SelectionMode="Single" ItemsSource="{Binding Path=Texts}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                </Grid>
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
        <ListBox.ItemTemplate>
            <DataTemplate>
                <TextBox Text="{Binding ItemText}" Grid.Row="{Binding Path=Row}" Grid.Column="{Binding Path=Col}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0"></TextBox>
            </DataTemplate>
        </ListBox.ItemTemplate> …
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml styles listbox

3
推荐指数
1
解决办法
1803
查看次数

标签 统计

c# ×2

wpf ×2

css ×1

listbox ×1

sql-server-2008 ×1

styles ×1

windows ×1

wordpress ×1

xaml ×1