問題タブ [gridviewcolumn]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
wpf - DataTemplate 内のコントロールから GridViewColumn を取得する
例:
TextBlock
内部にアクセスDataTemplate
すると、バインドされたパスに関する情報にアクセスできます。しかし、ヘッダーの名前を取得するために、TextBlock
それを含むGridViewColumn
もの (列リストにある) を (から始めて) グリッドのもの(列リストからGridViewRowPresenter
) と比較する方法がわかりません。GridViewColumn
GridViewHeaderRowPresenter
最後に、xx->XX、yy->YY のペアが必要です。
TextBlocks
これを使用して、内部のすべてのリストを見つけることができますListView
:
すべてのリストを見つけることができますGridViewColumnHeaders
:
TextBlocks
そして、と の間の接続を見つけることができませんGridViewColumns
...
これが理解できることを願っています。
c# - GridViewColumn Width プロパティのバインドが機能しない
Width
のプロパティに一方向バインディングを設定しました。GridViewColumn
最初はバインディングから値を取得し、プロパティに設定しWidth
ます。ソースが変更されると、バインディングから値を取得しますが、プロパティに設定されWidth
ません。どうすればよいですか? ここにコードがあります
<GridViewColumn Width="{Binding MaxWidthForTypeColumn}" >
はっきりとはわかりませんが、設定されているのかもしれませんが、変更はありませんGridViewColumn
。
私は他のプロパティからイベントを呼び出します
[編集] これは ListViewItem width プロパティのバグとしてのバグです
wpf - xamlのGridViewColumnHeaderの最後にある白い線を取り除く
これまで、GridViewColumnHeadersでいくつかの問題が発生しました。もともと、各列ヘッダーの間に小さな白いスライバーがあるという問題がありました。borderthicknessを0に設定しても、白い線は引き続き存在します。周りを見回した後、ControlTemplateを使用して、ヘッダーをデフォルトのテキストボックス属性に変更する必要があることがわかりました。私はこのコードを使用しました:
これは機能し、ヘッダー列の間の小さな白いスライバーを削除しました。また、ユーザーが列を移動したりサイズ変更したりすることを防ぎ、フォーマットを台無しにしてしまいました。ただし、下の画像に示すように、gridviewcolumnheaderの最後にまだ少し白いスライバーがあります。
それを削除する方法もありますか?
c# - コンテンツごとにプログラムでGridViewColumnsのサイズを自動化
ヘッダーではなくコンテンツごとに自動サイズ設定するようにGridViewColumnsをプログラムで設定したい(Width = double.NaN)
私は長い間検索してきましたが、この問題はDataGridColumnsで解決されましたが、GridViewColumnsではどうですか?
wpf - コントロールテンプレートでWPFのListView列にMinWidthを適用するにはどうすればよいですか?
こちらの同様の質問への回答に従って、XAML ページで MinWidth を設定できました。
私がやりたいことは、すべての ListView のすべての GridViewColumn のコントロール テンプレートでこれを達成することです。
これは可能ですか?
アップデート:
以下の簡単なサンプル コードを試してみましたが、うまくいきません。
wpf - ListView.GridViewColumn (*) 幅
WPFアプリケーションではListView
なくコントロールを使用しています。に幅を指定したいのですが、 に幅を指定すると、コンパイル時にエラーが発生します。画面を最大化したときに余分なスペースを自動的に埋めることができるように、に幅を提供する方法を教えてください。DataGrid
*
ListView.GridViewColumn
*
ListView.GridViewColumn
*
ListView.GridViewColumn
ListView.GridViewColumn
これに関するヘルプは大歓迎です。ありがとう
wpf - GridViewColumns のスタイリング
ListView で GridViewColumns のスタイルを設定する方法を見つけようと、stackoverflow を閲覧していました。私はこれに出くわしました:
GridViewColumn での WPF テキストの書式設定
一番上の答えは、1 つの GridViewColumn をスタイルする方法を示しています。私の質問は、Window.Resources でこれらの GridViewColumns のスタイルを設定する方法があるので、個々の GridViewColumn ごとにそれを行う必要がないということです。
wpf - GridViewColumnHeadersのキーボードアクセス?
ListViewの要件は、キーボードから列ヘッダーにアクセスできることです。これは、デフォルトのListViewでは発生しません。例えば:
アクセスキーはヘッダーに表示されますが、キーボードフォーカスは取得されません。この質問を読んで追加したTabIndexとTabNavigation: 列ヘッダーのTextBoxへのタブ移動
GridViewColumnHeadersキーボードにアクセスできるようにするには何をする必要がありますか?
wpf - GridViewColumn.CellTemplate での TextBlock テキストの折り返しが機能しない
この例で TextWrapping を機能させるのに問題があります。ここで私が間違っていることを誰かが見ることができますか?
wpf - How to bind to a property on a gridviewcolumn from its celltemplate
The general problem I want to solve is to have just one datatemplate for a checkbox which I can then use for many different columns in a listview (using a gridview). In all examples I've seen a seperate template is created for each binding which seems overkill to me.
I've been trying to do this by creating an attached property that the gridviewcolumn will set. Then I can simply have one datatemplate for a checkbox that binds to that attached property.
The problem I'm having is actually setting the checkbox source to the gridviewcolumn.
Here is the xaml:
P.S. The Attached property is working fine, I've attached it directly to the checkbox and used a relativesource self binding and gotten the values coming through, but when I try to bind it on the GridViewColumn I get no happiness, in fact I haven't been able to bind to the Header on the GridViewColumn either...
P.P.S I have tried other binding source expressions as well (just not the right one it seems)...
Edit: Immediately after posting this it dawned on me that the GridViewColumn exists for all rows and so that is probably why this isn't working?!
I've slept on it now and realise that doing things in this way wont work (because the GridViewColumn can only hold the value for the first row not each row as I would need it to) - however I still would have thought it possible to bind to the GridViewColumn?
Here is a xaml only example to show the behaviour:
Under such a scenerio I would expect to see "A Header" just above each "Visible row" text